But when ever any postback occurs that changes I did on the databound even gets cleared or the gridview rows changes to its actual form.
I mean in the code above I removed the first cell and spcified a column span for the second cell as 2.
Secondly if you want to include a custom field (some button or link) in the same column it’s not possible.
If we use proper command names for the buttons like “EDIT”, “DELETE”, “UPDATE”, “CANCEL” these will also trigger the appropriate Grid View Events.
This happens everytime i try to click on Edit/Delete on the Gridview. Although I am trying to use the "Edit, Delete" function from the Design view of the Gridview. I used the Select tab, Update tab & Delete tab in the sqldatasource configuration.the Select tab stored procedure works, whereas the Update & Delete tab stored procedure/sql command doesn't work. Code: I don't know what else to list down as the code, as I am doing this through the Design View of the Gridview & not in actual code.Here's the entirety of my C# code, in which I've been testing various event handlers: protected void Page_Load(object sender, Event Args e) protected void gv Registration_Row Data Bound(object sender, Grid View Row Event Args e) void gv Registration_Row Editing(Object sender, Grid View Edit Event Args e) protected void gv Registration_Pre Render(Grid View Row Event Args e) protected void gv Registration_Sorting(object sender, Grid View Sort Event Args e) Output Label's text is never changed. Note: I didn't actually change all the edit templates for the Grid View object in this Designer-generated version, but without working event handlers, it hardly matters. 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.But after the postback the deleted cell comes back.Hello, I have a gridview that is working the way I want it to.I came across a very interesting error while using buttons/link buttons in the Grid View for editing the Grid View rows data.The exact situation I faced is like this – I have a Grid View with a column which contains an edit button.