Hello,
I've a grid on a dynamically loaded UserControl. From the code-behind I'm adding serveral columns to the existing column collection. This happens on Page_Init. Now when a postback occurs the columns are added again and when the viewstate is loaded the columns from a previous creation are added also. So every postback my column collection grows.
I only want to recreated the columns on Page_Init manually and exclude them from ViewState. How can I force this?
Regards,
JosM
I've a grid on a dynamically loaded UserControl. From the code-behind I'm adding serveral columns to the existing column collection. This happens on Page_Init. Now when a postback occurs the columns are added again and when the viewstate is loaded the columns from a previous creation are added also. So every postback my column collection grows.
I only want to recreated the columns on Page_Init manually and exclude them from ViewState. How can I force this?
Regards,
JosM