Nagul
April 16th, 2003, 05:53 AM
Hi All,
I don't know whether it's a problem or it is like this only but i feel it as annoying.
I have a datagrid and i have written the below code in page_load event of the webform.
if not page.ispostback then
datagrid1.datasource = datatable.defaultview
datagrid1.databind()
endif
Now the problem is when the page again posted back on some event, i loose the data in the datagrid. Therefore i have to remove the if not page.postback condition and everytime a page is loaded it calls.
Anyone has any idea like what i am doing is correct or what should i be doing ????
Thanks...
I don't know whether it's a problem or it is like this only but i feel it as annoying.
I have a datagrid and i have written the below code in page_load event of the webform.
if not page.ispostback then
datagrid1.datasource = datatable.defaultview
datagrid1.databind()
endif
Now the problem is when the page again posted back on some event, i loose the data in the datagrid. Therefore i have to remove the if not page.postback condition and everytime a page is loaded it calls.
Anyone has any idea like what i am doing is correct or what should i be doing ????
Thanks...