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]
 

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

Back
Top