Alex Rivera | Logout

ASP.NET + GridView + CommandField as TemplateField

Asked 2009-10-30T00:43:37.350
10

I have a GridView. My GridView has a column that is contains an "Options" column. This column includes the traditional CommandField options (edit, delete, etc.). I have the code setup to work when a CommandField is used. However, I need to do some custom formatting so I needed to convert the CommandField to a TemplateField.

My question is, how do I trigger the OnRowCommand, OnRowEditing, OnRowDeleting, and OnRowUpdating events from the various LinkButton elements in my TemplateField?

Thank you!

Edit
Report

1 Answer

1

click on Columns in properties, add CommandField(Edit,update,Cancel) and Click on the "Convert this field to templateField"

Swich to Source and automatically going to add a code.

answered 2012-04-11T10:55:26.723

Your Answer