How to build a GridView dynamically?
Posted on 2007-12-01
I'm fairly new to ASP.NET, so I'm turning to you for help. Here's what I'm looking for.
I need to dynamically build a GridView on the page. The database that I'm working with is Oracle10. I need to pass the name of the Table in Oracle and the page would build a GridView control that would be populated with data from that table. Every column should be sortable. Every record would need to have the Delete option only. When the user clicks on Delete link, a message box should come up with confirmation ("Are you sure you want to delete this record?").
Please provide either a code snippet on how it's done or point me to a source where I can find the code snippet.
This is very urgent and I appreciate any help you can provide.
Just to summarize. I'm passing the name of the table and the GridView needs to be built with data and the Delete link next to each record.