Gridview edit mode rowupdating

Gridview edit mode rowupdating

It will have a single button in read only mode which is "Edit", And when I click on Edit, the row will change into Edit mode.

The editable fields of the row will change into edit mode and the "Edit" button will disappear.

Then I am calling my custom method which I am going to write in few minutes and it will bind the Grid View again.

Then it's grid View Users_Row Updating event and grid View Users_Row Deleting event. I have two optional parameters here which will get query type and the query.

however, with a little testing added in, ie, when this event fires, show the e.neweditindex, it shows that the neweditindex is correct, just that the gridview hasn't entered edit mode. So the problem I am having is that when I get the Datakey value I am trying to get the values in the controls in the Edit Mode of the current row I am trying to update. I am using the Find Control function to get the values from the editing row so I specifically name the dropdownlists and textboxes so I can access them here.But what happens is that I do get some of the values but they are the original values not the new ones being changed.Under "Template Field", I will have two properties which are "Item Template" and "Edit Item Template"."Item Template" property is used to control the appearance of a data item and "Edit Item Template" property is used to control the appearance of a data item in Edit mode. So here what I have done is, User ID is the primary key. For all other columns there is a "Edi Item Template".

gridview edit mode rowupdating-28gridview edit mode rowupdating-75gridview edit mode rowupdating-82

And in "Item Template", I have used a Label to display the value. And in "Edi Item Template", I have used a Text Box to display value, because it should be editable.

Join our conversation (5 Comments).
Click Here To Leave Your Comment Gridview edit mode rowupdating.

Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *