473,387 Members | 1,464 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,387 software developers and data experts.

Highlighting the clicked row in the datagrid

Hi

Is it possible to highlight the clicked row in a datagrid? How to do it

Thanks in advance.
Jul 21 '05 #1
6 1809
APG
Kshitij wrote:
Hi,

Is it possible to highlight the clicked row in a datagrid? How to do it?

Thanks in advance.


One way is to call select it when a cell is clicked or the current cell
is changed as in the following snippet:

private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e)
{
dataGrid1.Select(dataGrid1.CurrentCell.RowNumber);
}

HTH,
APG
Jul 21 '05 #2
APG
Kshitij wrote:
Hi,

Is it possible to highlight the clicked row in a datagrid? How to do it?

Thanks in advance.


One way is to call select it when a cell is clicked or the current cell
is changed as in the following snippet:

private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e)
{
dataGrid1.Select(dataGrid1.CurrentCell.RowNumber);
}

HTH,
APG
Jul 21 '05 #3
Hi

I couldn't find such event of a datagrid

Thanks and regards

Jul 21 '05 #4
Hi

I couldn't find such event of a datagrid

Thanks and regards

Jul 21 '05 #5
http://www.knowdotnet.com/articles/d...useselect.html
"Kshitij" <an*******@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
Hi,

Is it possible to highlight the clicked row in a datagrid? How to do it?

Thanks in advance.

Jul 21 '05 #6
http://www.knowdotnet.com/articles/d...useselect.html
"Kshitij" <an*******@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
Hi,

Is it possible to highlight the clicked row in a datagrid? How to do it?

Thanks in advance.

Jul 21 '05 #7

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

Similar topics

1
by: Kshitij | last post by:
Hi How do I find the row I clicked on the datagird Thanks in advance.
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: | last post by:
how to highlight a row of my datagrid (web) . i dont want to use select button. upon clicking on the row , it shouls be highlighted and cursor shouls remain in the same row. how to acheive...
2
by: Daniel Walzenbach | last post by:
Hi, I created an ASP.NET Datagrid where a single row can be selected by clicking anywhere on the row (according to...
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...
0
by: Robert Smith | last post by:
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...
6
by: Kshitij | last post by:
Hi Is it possible to highlight the clicked row in a datagrid? How to do it Thanks in advance.
3
by: VMI | last post by:
How can I select a row in a Web gridview? I added a ButtonField to my gridview, but I'm not certain what other properties I should change in order for the row to be highlighted. I also changed the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
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...

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.