J
Jade Seguin
Hello,
Hope somebody can help me with this cause I'm a ASP.NET beginner. I've
created A DataGrid, and I added few BoundedColumns, and in my
Page_Load section I added few TemplateColumns through the
myGrid.Columns.Add(myTemplateColumn). After that I bind the datasource
to the datagrid in the Page_Load only if it is not a postback.
Initially it works fine, but on PostBack (whatever I do on the
webform) my TemplateColumns dissapear Only the BoundedColumns stay.
BTW. the code myGrid.Columns.Add(myTemplateColumn) is not in the If
Not IsPostBack section, so it executes on each postback.
Why doesn't it work? I thought you should only do the bind on the
initial Page_Load and not on each postback, cause to me it seems like
a lot of processing (i.e. database connections etc...)... Should it
not be bound only once like my BoundedColumns which show fine on each
postback?
Hope somebody can help me with this cause I'm a ASP.NET beginner. I've
created A DataGrid, and I added few BoundedColumns, and in my
Page_Load section I added few TemplateColumns through the
myGrid.Columns.Add(myTemplateColumn). After that I bind the datasource
to the datagrid in the Page_Load only if it is not a postback.
Initially it works fine, but on PostBack (whatever I do on the
webform) my TemplateColumns dissapear Only the BoundedColumns stay.
BTW. the code myGrid.Columns.Add(myTemplateColumn) is not in the If
Not IsPostBack section, so it executes on each postback.
Why doesn't it work? I thought you should only do the bind on the
initial Page_Load and not on each postback, cause to me it seems like
a lot of processing (i.e. database connections etc...)... Should it
not be bound only once like my BoundedColumns which show fine on each
postback?