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.
As compare to SQLData Source or Access Data Sourcein SQLData Source or Access Data Source, we specify the Update Command and Select Command and call the Databind method Below is an example which works much the same way you are working.
Making a data source through coding----------------------------------------------------- Raheel Hussain--------------------------------Blog: posting is provided "AS IS" with no warranties, and confers no rights.
May be you may think why am I using link buttons as we are provided with some command field buttons by Grid View.
Secondly if you want to include a custom field (some button or link) in the same column it’s not possible.
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.