DataGrid going blank on edit

  • Thread starter Thread starter Chris Brandsma
  • Start date Start date
C

Chris Brandsma

I'm thinking this is simple, but...

I added an Edit/Update/Cancel column to a DataGrid. Any time I hit the
edit/Update/Cancel button the grid returns blank (no rows returned but the
header and footer).

My EditCommand code looks like this (pretty simple):

DataGrid2.EditItemIndex = e.Item.ItemIndex;
DataGrid2.SelectedIndex = e.Item.ItemIndex;
DataGrid2.DataBind();

any ideas?

Thank you.
 
Hi Chris,

Do you have a EditItemTemplate defined in your <ASP:DataGrid>? If not,
ASP.NET might not know what to render in Edit mode for your particular
DataGrid.

HTH,
Mark Jen [MSFT]
 
Back
Top