473,794 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1429
The row is highlighted by clicking to the left of the row where the row
headers appear.

SelectionBackCo lor 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**********@BT Internet.com
Nov 20 '05 #2
Cor
Hi Li Pang,

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

listview1.HideS election = False

I hope this was what you where looking for?

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

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

SelectionBackC olor 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**********@BT Internet.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.Hide Selection = 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.FullR owSelect = 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
23361
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 show up for each item I add to the listbox. foreach (Column column in columns) { ColumnsListBox.Items.Add(column.Name); ColumnsListBox.Controls.Add(new ColumnListControl(true, column.Name,
1
1260
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 grid must select the entire row and not allow editing). I have selected the datagrid so far and succed after many research to allow only entire row selection with this help http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q792q
12
5420
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
2614
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 frm_nc_code As New frm_nc_sen frm_nc_code.Show( Well what I want to have happen is it loads the form then shows all of the controls on the form (especially the listview control which should be blank at this time)
21
5232
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 table and 11 sub items with data about each column. When a Row in ListView1 is selected the Data in ListVies2 is loaded to show the correct data. Initially the first row in ListView1 is selected in FormX load
7
15009
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 MyList data is resident in a dataset table. I'm stuck and can't choose either because. If I choose ListView as my control I don't understand how to programmatically get the data from the dataset table
1
1610
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 dragging items that have images. I first thougth that an item has its image and I could drag the complete object, but I see that in the second listview the image doesn't appear. It appears again if I move it again to the first listview.
1
5098
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 simple program that illustrates the exception is below: using System; using System.Windows.Forms; namespace WindowsApplication1
2
5210
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 else I guess) that can then easily be imported into Excel for example. Any pointers? I see DataSets have a WriteXML method which should be fine, I've used it before, but I can't figure out how to get the Listview contents into the dataset! ...
0
10433
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10161
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9035
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.