473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

remove highlighting from datagrid row

Hello,
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
MyDatagrid.Unselect(IntCurrRow)
'Move back to the row b4 the event
MyDataGrid.CurrentIndex = IntLastRow
MyDataGrid.select(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
and
possibly put it on another row.
Thanx in advance
Robert
Nov 21 '05 #1
0 1080

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Job Lot | last post by:
have gone through couple of articles and confused now. What is the most efficient way of highlighting row in Windows Forms DataGrid so that it takes into account both mouse click and keyboard...
2
by: Charlie | last post by:
Hi: Using the WinForms DataGrid, I would like to have the entire row highlight rather than just the cell that was last clicked. How do you do this? Thanks, Charlie
2
by: Carolyn Vo | last post by:
I have been looking and looking but can't seem to find out how to get the row selected in a web control datagrid (NOT a web form datagrid!!!), and how to highlight the selected row. I'm sure this...
2
by: ___Newbie___ | last post by:
Hello, I'm looking for a control that can display rows and columns similar to a table but highlight the entire row during selection? Listbox highlights the entire row but doesn't support...
2
by: reiks | last post by:
My requirement is to highlight a row in a datagrid upon clicking it and the cursor should remain in teh same row for editing. I dont want to use a select buton column or link button in my...
4
by: WebMatrix | last post by:
Hello, I need to extend functionality of ASP.NET datagrid. Onmouse over, the whole row needs to be highlighted. OnClick highlighted color must remain, and the value of one of the columns must be...
7
by: JohnSmith90 | last post by:
I want to highlight the entire cell data for all rows of a particular column in a data grid. I do not want to fill the back ground color of the cell. How to do that in a data grid? <span...
1
by: Bob Loveshade | last post by:
I am looking for an example that shows how to select and highlight multiple rows in a DataGrid. My DataGrid is part of a Web User Control which is contained in an ASPX page. I haven't been...
2
by: Bunnist-Priest | last post by:
Hello Everyone, My first predicament is that I want to make a colomn of my vb.net DataGrid a ProgressBar colomn. (full of Pr.Bars). Is it that difficult? Is there a code example? using - Dim...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.