I am created dynamically template columns to a gridview and assign datatable as a datasource.Its working fine.Whenever i am postback the form the data in gridview is disappear.Why the dynamic template fields are maintaing the viewstate. Any idea ?
dynamic template columns to a gridview
Hi to All

Rambabu CHPosted Jul 26, 2012, 8:44 AM
Atul KumarPosted Jul 26, 2012, 6:52 AM
if(IsPostback)
If postback occurs then do not bind your datasource again to gridview.
This is happening because on postback, your gridview is binding again.