A Row-Highlighted, Row-Selectable Custom DataGrid Control

Published 19 July 04 10:26 AM | Scott Mitchell

It's funny what you find lying around your hard drive. I was poking through my “Misc ASP.NET Control Projects” folder and stumbled across a row-highlighted, row-selectable custom DataGrid control. Basically, it allows you to specify a background color and whenever the user moves her mouse over a DataGrid row, the row turns that color. Plus, by setting the RowClickEventCommandName property you can indicate that if the row is clicked it should cause a postback and trigger a particular DataGrid event. You can see what I mean by checking out this live demo.

Anywho, when I found this I project I started racking my brain - what in the world did I creat this for? It was created on May 19, 2004. Was it just for fun and to learn something new? Or was it meant to be an article for 4Guys? Or was I planning on building an article around it for MSDN or asp.net PRO? Since I couldn't answer that question, I decided why not make a 4Guys article out of it. So here you go: Creating a Row-Selectable DataGrid Control.

For more custom controls I've created, check out My Code Projects.

Filed under:

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Archives

My Books

  • Teach Yourself ASP.NET 4 in 24 Hours
  • Teach Yourself ASP.NET 3.5 in 24 Hours
  • Teach Yourself ASP.NET 2.0 in 24 Hours
  • ASP.NET Data Web Controls Kick Start
  • ASP.NET: Tips, Tutorials, and Code
  • Designing Active Server Pages
  • Teach Yourself Active Server Pages 3.0 in 21 Days

I am a Microsoft MVP for ASP.NET.

I am an ASPInsider.