Commandfield rowupdating dating for runners
In your Grid Views On Row Updating event you will call your data access layer's methods to do the updating.... -Frinny @Frinavale You said that we have to bind object with grid view at page.prerender . What happens is that the View State for the Grid View is loaded just before the Page Load event.I think if we do the same thing on page load event it work because value is set when row updating event is fired. This means that all of the data that the user provided for the row that they are updating is loaded into the ASP.If I want to access the method in which we define update query, how can I access that method on aspx page & update the data in a grid view without direct use of an query on aspx page under sql data source?What you would have to do is implement a method that handles the Grid View. In this method you will have to retrieve the data from the row that is updating and use this data to update your database.you also check this link please , by thw way ur link is not working. So, the View State with all of the data for your Grid View is loaded just after the Init event.This makes the data in your Grid View is available in the Page Load event...including data entered by the user.I want to use this method so I can do an update in grid view directly. Grid Views can bind to Data Tables, Data Views, Arrays of Objects ..more.I've never actually used the Sql Data Source before. So, you need to populate the object that you are going to use as your data source at some point in your page life cycle.
Edit: if you do a Data Bind in the Page Load event every page request all of your data will be lost It's the most common problem that people have with Grid Views that I've [email protected] Now I get the answer your mean is that when we bind the data at page load event.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 .Anyways, once you've populated your data source (or retrieved it from cache) you set the Grid View.Data Source property to the object you are using..call the Grid View.