21601 days on xHamster
71533M profile views
52082K subscribers
13334 comments left

Asp gridview rowupdating

Now you can ask questions directly to me on my new site ASPForums.

Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.

This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.Save all or press "Ctrl S" and hit "F5" to run the page, the page will look as in the following image: Click on "Edit the Grid View", it will display Textboxes in each cell as in the following image: Edit the value(s) here and click on the Update link, it will update all the data or to remove it click on the "Delete" link above the image shown.One note will be helpful for you, while describing Columns in Grid View if you are using a boundfield then create objects of the control using cells[index] in the rowupdateing event of Grid View, but if you are using controls itself like Label or textboxes etc then use Fincontrol("stringid"). Read() Then Temp Staff Key = reader3("staff_key") If Not Is DBNull(reader3("post_key")) Then Temp Post Key = reader3("post_key") End If If Not Is DBNull(reader3("roster_key")) Then Temp Roster Key = reader3("roster_key") End If If Not Is DBNull(reader3("shift_date")) Then Temp Shift Date = Format(reader3("shift_date"), "dd/MM/yyyy") End If If Not Is DBNull(reader3("start_time")) Then Temp Start Time = Format(reader3("start_time"), "HH:mm") End If If Not Is DBNull(reader3("end_time")) Then Temp End Time = Format(reader3("end_time"), "HH:mm") End If If Not Is DBNull(reader3("SL")) Then Temp SL = reader3("SL") Else Temp SL = "0" End If If Not Is DBNull(reader3("VL")) Then Temp VL = reader3("VL") Else Temp VL = "0" End If If Not Is DBNull(reader3("ML")) Then Temp ML = reader3("ML") Else Temp ML = "0" End If If Not Is DBNull(reader3("PH")) Then Temp PH = reader3("PH") Else Temp PH = "0" End If If Not Is DBNull(reader3("APH")) Then Temp APH = reader3("APH") Else Temp APH = "0" End If If Not Is DBNull(reader3("TOIL")) Then Temp TOIL = reader3("TOIL") Else Temp TOIL = "0" End If If Not Is DBNull(reader3("Others")) Then Temp Others = reader3("Others") Else Temp Others = "null" End If If Not Is DBNull(reader3("shift_type")) Then Temp Shift Type = reader3("shift_type") End If If Not Is DBNull(reader3("submitted_by")) Then Temp Submitted By = reader3("submitted_by") End If dr = dt. Data Bind() 'Persist the table in the Session object. Close() End Using End Sub (look at the ASPX markup code to see what's the name of your input element name - give it one if it doesn't have) then use the code above to read your element in your grid view event handler.

Yes it is IF NOT Is Post Back, HAHAHAHA I am a more familier with VB ..missed to read that '!

Please or register to post comments
If spammers comment on your content, only you can see and manage such comments Delete all
I was just testing if I will get the changed value out of the textbox when updating with no luck. I just cant get the new value. What am I doing wrong? I have tried numerous things. 
12-Jan-2019 10:16
I have a Gridview with AutoGenerateColumns="False". I am using a TemplateField to display my Edit, Update and Cancel 'buttons' in the first column of the GridView within respective 
12-Jan-2019 10:19
Hello everyone. I am using Gridview. I want to Edit data click the Update button but page is be postback. But I want page is doesnt posback I want edit data. How can I do. aspGridView 
12-Jan-2019 10:24

Asp gridview rowupdating introduction

Asp gridview rowupdating

Recent posts

12-Jan-2019 22:14
13-Jan-2019 02:25
13-Jan-2019 10:31