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.In case of the bound field’s we need to check what column it is and need to use index of that cloumn, which is little hard and even in future if we change the column order If you see the Last Template Field part in the above code, I am using the link buttons for edit, update, delete and cancel.For details, see Connecting to SQL Database By Using Azure Active Directory Authentication.
By default all the boundfields will be trasferred as Textboxes in Edit Mode.The property of the Db Parameter object should be set to the name of the column.This setting indicates that the value of the parameter is not set manually, but is taken from the particular column in the currently processed row.This causes the rows affected count returned to be zero, which the Data Adapter interprets as a concurrency conflict.In this event, a DBConcurrency Exception will be thrown.