how to higlight a specific row in datagrid

smriti

Regular
Joined
Jan 7, 2005
Messages
54
hi friends,


i had an asp.net datagrid with edit and delete buttons as itemtemplates
when i click edit button i am going to edit form and after editing i am returning to
the page with datagrid.
i want the row from which i clicked edit to be highlighted.
i tried using itemdatabound but i couldn't get.

ny ideas or suggestions?

Thanks
 
put this in DataGrid2_EditCommand

the first line is really what you need but i've included the others just so you can see how to handle diffrent parts of the grid

DataGrid2.Items(DataGrid2.EditItemIndex).BackColor = Color.Azure
CType(DataGrid2.Items(DataGrid2.EditItemIndex).Cells(3).Controls(0), TextBox).Enabled = False
DataGrid2.Items(DataGrid2.EditItemIndex).Cells(3).BackColor = Color.Black

hope this helps
 
Back
Top