This GridView example demonstrates handling button click events for a row in a GridView.

This example also demonstrates the technique of using DataKeys to store and retrieve hidden field values. The GridView control's property DataKeyNames="ProductNumber" is used to store the ProductNumber field value for each record in the DataKeys collection.



DescriptionPrice  
Windows Vista $50.00
Visual Studio 2005$12.00
Xbox 360$123.00
Playstation 3$90.19
DeleteMe$12.00
Apple iPhone 2$145.00
Apple iTouch$200.00
Bello TV Stand$70.00
Bush Office Chair$120.00
Windows 7 Ultimate$399.99
Windows XP Professional$45.00
Samsung 50" Plasma TV$1,819.99
Panasonic 60" Plasma TV$3,500.00
Whirlpool Centralpark Refrigerator$12,345.00
PSP2$200.00
Bush Office Desk$129.99
Dreamweaver CS4$300.00
This is my test$1,234.50
Microsoft Office 2007$199.99
Another test$12.23
Visual Studio 2008$20.00
Last test product$456.75
Xbox Series X$499.99
Playstation 4$299.99
Playstation 5$599.99
iPhone X$789.99