Rowupdating old values null
I like to be in more control of my database connections. You could do this in your Page Load event if you want to.
You could cache the object that you are going to use as a data source too.
(Well it should matter to you because this is a very important behaviour that you need to understand) All you want to do is determine which row the user was editing (which is easily done in the On Row Editing event)..retrieve any information that you need in order to display the information in more detail in some other "page" or "control". This is why you are able to do a Data Bind in your Page Load without losing data entered by the user. I don't know what you're talking about with regards to your "display" method.
I'm not even sure you have a question at this point...
Ok the reason why you aren't losing data is because you are only doing your Data Bind in your Page Load event the first time the page is loaded (if ! This way your data is not getting over written when the user-provided-edit-data is posted back to the server.
But do you notice how you are calling the display() method in several different places?
-Frinny @Frinavale The event is fired between load view state & save view state when the event is fired it set the values in textbox or whatever server control we used. Then there is no matter of data loss if you load the page again but I have to bind data in a grid view through view state on page load no chance of data loss. NET Page Life Cycle for a more detailed explination. Data Bind in the Page Load event (without checking if it's postback) then you will not be able to retrieve user input in the Grid View. -Frinny The View State is stored some time in between the Page Pre Render event and the Save State Complete event (heading towards the Render stage).
All of this is covered in the article I sent you a link to :) I'm not sure what you mean by: @Frinavale Now i implemented the editing in gridview i handle events & after that i call display method in which i bind the grid view on page load event its work correctly.......
the view state is already loaded with previous value & that value again saved in a view state so the same data is displayed again & again whether you edit the data in a grid view or not. other thing i want to know what about the load postback event that is also fire between pageprerender & page load .If you do a Data Bind in your Page Load event every page request (without checking if is Postback is False) then you will be overwritting anything that the user provided.