Possible to use DataTables with ASP.Net Dynamically Created Tables?
Possible to use DataTables with ASP.Net Dynamically Created Tables?
Canis Majoris
Posts: 3Questions: 1Answers: 0
Currently I have a standard aspx webform that adds table rows/cells within the Page_Load function. Can DataTables.net be used with dynamically created tables?
This discussion has been closed.
Answers
Hi @Canis Majoris ,
Yep, you can add rows on the fly as in this example. You can also get your data from a remote source with Ajax, as shown here ,
Cheers,
Colin
@colin , thank you for your response, though not quite what I was looking for. I'll try and be more specific. What I'm doing is adding rows to an HtmlTable control in asp.net programmatically when the page loads for the first time. I'm doing this on a web form that points to a master page. Not sure if that helps.
Hi @Canis Majoris ,
Ah, ok, once you've finished adding those rows, you can just initialise the table then. It doesn't need to be on page load, it can happen at any time.
Hope that helps this time
Cheers,
Colin
This isn't really a DT question at this point, but can you tell me how to initialize the table? I'm new to ASP.NET... Thank you.