Grid rowupdating

Rated 3.95/5 based on 851 customer reviews

I'm trying to update the xml file in the Row Updating event as follows - protected void gv Main_Row Updating(object sender, Grid View Update Event Args e) My dataset "ds" is null.

Data Source always gives you null for this u need to fill agin dataset from xl and update the row of dataset and using data adapter u need to update the dataset to xml u also need to use command builder for creating commands for upading dataset to database(XML) Data Source property of Charge Grid View would be null after the postback since it is not persisted in View State but data is showing after the post back only because of view state of inner control of gridview ..

grid rowupdating-79

grid rowupdating-41

grid rowupdating-77

grid rowupdating-41

Follow this link for more details --While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.So the the question is the same : How can I get all values of the fields in the editform and save it before Grid. Update Edit() so that after this routine I can examine the fields and do some more inserts to the database. Yes it is IF NOT Is Post Back, HAHAHAHA I am a more familier with VB ..missed to read that '! Place Link Button Edit in Item Template and Link Button Update and Cancel in Edit Tamplate of Gridview's column. Fire Grid View's Row Editing event for Link Button Edit. Fire Grid View's Row Updating event for Link Button Update. Fire Grid View's Row Canceling Edit event for Link Button Cancel. Set Command Name propery of Link Buttons according to their respective event. Set Grid View's Data Key Names Property to record ID (ID=Primary/Unique key of student table) 7.

Leave a Reply