Rowupdating event grid view
You can change this connection string according to your SQL server database setting. If you want use my database file then attach that file. If you are using your database, you need to replace column binding with your database table columns.This function is use to fetch data from the Vendor table, fills data in a Data Table object and find it to a Grid View control using the Data Source property. For more information I am attaching my test application and database, so download it for better result and if you liked this article or you have any advice about my any article don't be hesitate drop me a comment on c-sharpcorner comment section.I'm using a databound grid view (below) to edit with -when I click the edit button I see the Edit Item Templates all correctly populated, but when I press the Update button - I am told "cannot find control DDLCategory Edit in Control Parameter Edit Category ID - I have tried changing the control ID to ct100$Main Content$Grid Viewgory ID but no change and now I'm thinking I need to put a findcontrol in the code behind - but i'm not sure how to access the Edit state of the gridview to say something like: protected void Grid View1_Row Data Bound(Obj My apologies for such a long delay, I think I've led us on a bit of a wild goose chase.When I set up my databound grid I hadn't called up the key identity so as soon as I started to call up row related changes of course I was running into the problems above.
like onrowupdating event after performing all operation i call display method at the end.
-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.......
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.