dynamic grid view loses binding when post back occurs?
dynamic grid view loses binding when post back occurs ?
I have a dynamic grid View with template fields and bound fields as columns
for the first page load a开发者_开发知识库ll binding looks fine.values are populated in all columns
when I trigger an event such as selected index changed in Drop downlist present in the column header(inside template field ) the binding are lost and the event is never catched.
how to retain controls when post back occurs and how to resolve this problem ?
Everytime there is a postback you will have to rebind your grid. Hope you are doing this?
I think you should populate the grid in the Page_Load (which is fired on each update) and set this after populating: <gridname>.Databind();
精彩评论