473,804 Members | 3,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1838
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_Curre ntCellChanged(o bject sender, System.EventArg s e)
{
dataGrid1.Selec t(dataGrid1.Cur rentCell.RowNum ber);
}

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_Curre ntCellChanged(o bject sender, System.EventArg s e)
{
dataGrid1.Selec t(dataGrid1.Cur rentCell.RowNum ber);
}

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*******@disc ussions.microso ft.com> wrote in message
news:B7******** *************** ***********@mic rosoft.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*******@disc ussions.microso ft.com> wrote in message
news:B7******** *************** ***********@mic rosoft.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
285
by: Kshitij | last post by:
Hi How do I find the row I clicked on the datagird Thanks in advance.
2
7077
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
2677
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 question comes up all the time but I can't find the solution(s) anywhere. From what I understand, the web control datagrid doesn't have any row selected or row highlighting capabilities. What kind of hack am I going to have to put into place?...
2
1117
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 it? plz help me out
2
3185
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 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchTopQuestionsAboutASPNETDataGridServerControl.asp, Selecting Rows by Clicking Anywhere). Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) _
1
3356
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 able to find any examples which demonstrate how to do this. My Code:
0
1092
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 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
6
283
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
2926
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 EditRowStyle.BackColor and EditRowStyle.BorderColor properties so that I could see some change when I click on the button column. When I click on the button, it does postback, but I don't see the highlighted item. What am I doing wrong? I'm...
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10303
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
9132
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
7608
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
6845
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
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4282
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
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.