Hello Everybody ,
i am using the WebGrid to Show some data in aspx page ,the data is not from database and was inserted into the WebGrid from my Server Programm ,when the WebPage is postback the data i have inserted is dispear , Can Anybody tell me how to solve the problem ,thank you all.
Anybody an idea?
I have a similar problem with a datasource being linked on it.
About saving it in a viewstate (UltraWebGrid EnableViewState="true") does not work
How would I be able to save ALL the records, within my webgrid. (with their data) in a simple way?
save your data into an object in viewstate or in session
Thank you for answering my question .Yes i am using the grid in Unbound mode ,and as you say i add the data in a postback event handler (say Button Click). In a another Button Click handler i use the active row's data to do some more work ,but when i want get the cell value in the grid ,the data disappear as i have said . the worst thing is that the data(sometimse a lot of data) i inserted is from another computer through net and ,if every pageload time i must get it from net ,maybe cause something bad , is there any other way to solve the problem.
Hello,
Are you using the grid in Unbound mode (manually adding rows/columns instead of calling DataBind() and setting DataSource?). In this case, you may need to explicitly populate the grid with data upon each call to the page, for example in Page_Load. If you are adding the data in a postback event handler (say Button Click), it will most probably be not available after postback in the next reload of the page.
If this does not help, maybe sending some additional information, like C# / VB.NET code you are using - will provide additional clues.