Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1220
dynamically adding grid columns without duplicating
posted

hello, i am adding columns dynamically, 

i re-add them on each postback in order to skip using viewstate. 

even though i call grid.Columns.Clear() before re-adding, the columns get duplicated on each postback. 

what is a good clean way to re-add columns dynamically on each postback without duplicating? 

  • 4555
    posted

    Hi,

    The method grid.Columns.Clear() should work. Please download the latest service pack and test using it. If the error still exists then please debug the code and test the number of columns after the Clear() method.

    Magued