By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,327 Members | 849 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,327 IT Pros & Developers. It's quick & easy.

remove highlighting from datagrid row

P: n/a
I have a problem whereby I wish to programmaticlly change the current row
of the datagrid to a specific row. This is so that when the user clicks on a
grid row
and the datavalidation fails then the cursor and highlight should move back
to the
original cell.
The code I have so far is as such
Dim IntLastRow as integer

Private sub
MyDatagrid_currentcellchanged(.................... ..................etc)
dim IntCurrrow as integer = mydatagrid.currentcell.rownumber

If IntLastRow = 0 then
IntLastRow = IntCurrRow
end if
If Not DataValidation(IntLastRow) then
'un-select the clicked row
'Move back to the row b4 the event
MyDataGrid.CurrentIndex = IntLastRow
end if

IntLastRow = MyDataGrid.currentIndex

end sub

This seems to correctly place a cursor next to the original row b4 the
click, however
the clicked row still has a highlight on it. How do I remove this hightlight
possibly put it on another row.
Thanx in advance
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.