Editable datagrid with dynamic table data

S

stut

Not so easy!!! I have learned that I can't have an editable datagrid
using AutoGenerateColumns=true. OF COURSE NOT!! That would be too easy.
So how the heck do I do it?

I have a simple Web Form that dynamically populates a listbox with some
Oracle database table names ("select table_name from tabs" FYI). I then
have my datagrid dynamically show the data from ANY of the tables
listed ONCHANGE of the listbox. I just set AutoGenerateColumns=true on
the DataGrid, ExecuteReader, then Bind. Finally I wire-up the event
handlers for Edit, Update, Delete and VIOLA......an UN-editable grid.
Perfect - time to go home right? WRONG! That's why they pay us the big
bucks (??). I actually have to do some coding.

However, I can't find one useful article on how do use Template columns
and EditItemTemplates and ItemTemplates. Any help greatly appreciated.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top