Gridview rowediting rowupdating

I connect to my database and gave it a SELECT query and it works fine. Grid View Edit Event Args) Handles GV_Student Record.

I have a gridview which will populate at Page Load.

After searching long and hard I found a great article that solved my issue.

Take a look at the page load if you are binding on post back then the values get updated before you are able to access them.

When I hit Update, the changes are not saved, and there is no error message. When I hit Update, the changes are not saved, and there is no error message. Then the page posts back, the text boxes go back to being labels and the new values are lost, and the Row Updating code never fires. Yes, I did put the breakpoint at the Row Updating line (and not in the function).

I have loads of codes here, because ive tried every way possible. Public Sub GV_Student Record_Row Editing(By Val sender As Object, By Val e As System.

Then i want the user to be able to edit any row in the gridview, so i did this: Now I know i hav to use Row Editing event, Row Updating Event, Row Canceling Edit event to make everything work. I hoping someone could point me in the right direction on how to use these 3 events, what syntax/coding should i use to handle these 3 events.

Data Source = Get Data(); This Get Data function will return Data Set or Data Table. If still confusion then pls give your code by which you have bind grid.

Make one function that will fetch data from database and and return Data Set/Data Table like, gv. Add(New Sql Parameter("@Subject Code", LBSubject Code.

Leave a Reply