473,396 Members | 2,009 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,396 software developers and data experts.

How to hilight items on datagrid and listview controls?

Very basic question, how to hilight an item (row) on
datagrid or listview controls?

Thanks

Li
Nov 20 '05 #1
5 1416
The row is highlighted by clicking to the left of the row where the row
headers appear.

SelectionBackColor and forecolor properties allow you to select the colors
which the row will appear when selected.

Is that what you mean ?

OHM
Li Pang wrote:
Very basic question, how to hilight an item (row) on
datagrid or listview controls?

Thanks

Li


Regards - OHM# On**********@BTInternet.com
Nov 20 '05 #2
Cor
Hi Li Pang,

That is cooperative, OHM for the datagrid and I take the listview

listview1.HideSelection = False

I hope this was what you where looking for?

Cor
Nov 20 '05 #3
I'd like to have the codes for programmatically controling
the hilight property.

-----Original Message-----
The row is highlighted by clicking to the left of the row where the rowheaders appear.

SelectionBackColor and forecolor properties allow you to select the colorswhich the row will appear when selected.

Is that what you mean ?

OHM
Li Pang wrote:
Very basic question, how to hilight an item (row) on
datagrid or listview controls?

Thanks

Li


Regards - OHM# On**********@BTInternet.com
.

Nov 20 '05 #4
Thanks Cor,
It works when the tab leaves listview control. Suppose I
load some data into listview, and want to hilight 3rd row,
how can I do so without interrupting it?

-----Original Message-----
Hi Li Pang,

That is cooperative, OHM for the datagrid and I take the listview
listview1.HideSelection = False

I hope this was what you where looking for?

Cor
.

Nov 20 '05 #5
Cor
Hi Li Pang

To set the full row in the load event of the form
listview1.FullRowSelect = True

To select a row 3
listview1.Items(2).Selected = True

But if you use the selectedindex change event you have to prevent that from
firing with a flag/bool/switch or whatever you call it. ( I do not use that
with a listview)

I hope this works for you?

Cor
It works when the tab leaves listview control. Suppose I
load some data into listview, and want to hilight 3rd row,
how can I do so without interrupting it?

Nov 20 '05 #6

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

Similar topics

2
by: John R. | last post by:
I want to have a listbox that shows a checkbox and a textbox. I created a user control that has a checkbox and a textbox in it and have been trying to add it to a listbox but I can't get it to...
1
by: Jean-Claude Bertrand | last post by:
Hi! Windows of the application IO have to built (my first one in vb.Net) is made from 2 part: a) A grid wich will be used only to display the main information of the current record (so the...
12
by: Mike Smith | last post by:
Hey anyone knows how to find an item in a list view based on text ? Cant seem to get the IndexOf method working. would the LVM_FINDITEM method using SendMessage API work in .Net ?
3
by: Holmes | last post by:
Hello Ran into a bit of a problem here and have now exhausted my resources to getting this working What I am trying to do is load and show a simple vb form with a listbox in it Dim...
21
by: StriderBob | last post by:
Situation : FormX is mdi child form containing 2 ListViews ListView1 contains a list of table names and 4 sub items with data about each table. ListView2 contains a list of the columns on each...
7
by: BobAchgill | last post by:
I am trying to decide which of these controls to use to implement letting my user select a full row from MyList. The MyList has several columns which would be nice to sort by at run time. The...
1
by: Diego F. | last post by:
Hi. I'm having a problem with listview controls. I'm using a control that adds drag and drop functionality to a listview (I get the control from codeproject). Now I'm having problems when...
1
by: dvestal | last post by:
I have a ListView with checkboxes. I want to remove items when the checkboxes are unchecked, but to do so yields an ArgumentOutOfRangeException. Is there an easy way to get around this? A...
2
by: JamesB | last post by:
I have found plenty of details on filling a listview from a dataset, but I need to do the opposite. I have a ListView and I would like to save out the information it contains to xml (or anything...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.