3
Answers

how to retain the state of dynamically added gridview

Hi friends,
 
         I Have gridview by default no columns declared in the aspx page. I declared the columns dynamically based on the requirement. I have a subject dropdownlist control ,inwhich selectedIndexchanged event I created dynamic columns(label,and textbox) show in the page.. For label control I bind the data from database and for Textbox i just enter the data from here. Outside the gridview I Have the button for save this gridview value to database.In button click event i would like call the gridview data for saving in the database. But I Have an issue with gridview state level.In this button click event postback, gridview loses their data value,so i cannot able to read the data from gridview. what is my task is I want to read the gridview data to save to database. help me.
 
I post my code previously. but no result. i tried my level best. 
how can maintain viewstate for gridview for different postback[^]
Answers (3)