asp.net - How to preserve value of dynamic created gridview column -


I have made all the gridview columns dynamic and the column also exists checkbox. The problem with Gridview does not preserve this dynamic-built column value. For example if I have selected some line through the checkbox column and clicked on the button to get all the selected row IDs, the page becomes empty as the grid is not empty with the data value.

Any help would be highly appreciated.

Thanks, Alvin

This probably happens when you are creating dynamic columns Are there.

If the column is created in the page_load event, or after the page event process, the viewstate will not be able to populate your columns on a postback.

If possible, try to create your dynamic columns in the Page_Init event, this will allow the viewsto to properly load the column.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -