It is simple to do; create a button object, set its all properties accordingly, also add the button's click event handler and finally, add it into the control collection of the control (Container) passed as an argument.
Listing 4 is not a Command it means we have to instantiate it with a label as in Grid View's normal mode when each cell text of Grid View's rows is displayed in label.
The example illustrates how to delete selected rows of the ASPx Grid View bound with an in-memory Data Source.
In the template field I will Place a label or some controls, So that it’s very easy to access those controls in the code behind by using Find Control method. Item Template is the content to display for the items in the Template Field.
By default all the boundfields will be trasferred as Textboxes in Edit Mode.
To avoid this we need to keep the property Read Only as false, Then in the edit mode nothing will happenes. The reason I use Template Field instead of Bound Field is that, it is very easy to grab those controls in the codebehind if we user labels or textboxes.
We will use Template Field, whenever we want to define some custom control in the data bound controls like Grid View, Data Grid or Data Repeater.Programmers are aware of the significance of these codes but end users won’t understand what a particular code means.It is up to the user to take advantage of this feature.Therefore, by default, control is instantiated with Label and is added into the Container. Net) forum i found that developers ask how to enable or disable or show or hide server side controls like textbox, label, checkbox, checkboxlist, radiobutton, radiobuttonlist & dropdownlist or combo box in Grid View edit mode. Net 2.0 which is very easier then Data Grid Control in ASP.