Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Highlight selected row in a GridView
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01344194
Message ID:
01344196
Vues:
21
>Hi All,
>
>I have a Link ButtonField in my GridControl control displaying total umber of orders for a specific category. When user clicks on the link I would like to highlight his/her selection by changing the row's BackColor property.
>
>So, in the GridView_RowCommand I put the following whcih works with the exception of clearing BackCOlor of previously selected record:
>
>
>Select Case e.CommandName
>            Case "ItemCount"
>               ''clear currently selected row
>               gvStats.RowStyle.BackColor = Drawing.Color.White
>
>               ''highlight selected record
>                gvStats.Rows(intRow).BackColor = Drawing.Color.Yellow
>End Select
>
>
>Thank you,
>Daniel

Hi Daniel,

I'm doing this through attributes and client-side code. I'm actually highlighting on mouse move in and out, but it can also be done on click. There are tons of samples in the Internet, just google on "highlight record GridView ASP.NET".
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform