Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty cells on Update of DataGrid columns generated at runtime

Status
Not open for further replies.

iambrunner

IS-IT--Management
Feb 1, 2005
3
US
Hi all,

I have a datagrid (dgrdOutput) for which I create BoundColumns at runtime for each field in an SQL table (see line 115 for create of columns). My problem is that when a user tries to edit and then update the datagrid, the table row that gets passed to my Update function (UpdateBtn_Click) only contains one column.

That is, e.Items.Cells.Count = 1, even though source.Columns.Count = 4. As a result, the datagrid appears to only have one column – the ButtonColumn – upon attempting to Update.

Too see what I’m talking about, go here and try to Edit and then Update a row:

A full copy of the code has been posted here:

This has me completely stumped.
Thank you so much in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top