smriti Posted February 16, 2005 Posted February 16, 2005 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 Quote
ombun2 Posted February 16, 2005 Posted February 16, 2005 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 Quote
ombun2 Posted February 16, 2005 Posted February 16, 2005 oh, obviously you should have DataGrid2.EditItemIndex = e.Item.ItemIndex beforehand Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.