DataGrid going blank on edit

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.
 
M

Mark Jen [MSFT]

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

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top