hi,
i have a DataGrid that's bound to a table within an untyped DataSet. during the application's use, the table has rows added, updated, deleted, etc which is handled by a method in the page's code behind.
after the method executes the page reloads. my Page_Load handler explicitely states that it should be rebuilding the DataGrid regardless of the page being a postback or not since the display information in the datagrid isn't part of the viewstate. fine.
now, if i *refresh* the page (F5), the datagrid shows correctly. i've checked the dataset and it's table to see if there's any difference in content for after method execution and refresh: they're identical. i've also verified that my methods that rebuild the DataGrid are called after the data has been changed.
so that being said, why is the new content being ignored?
should i register a StartUpScript to force the form to submit? (i tested this and this does work, but there's gotta be a better way than making two trips to the server for a refresh).
for what it's worth, the datagrid is built with nearly all custom template columns.
toy code below
any thoughts? thanks in advance...
..:: mirirom ::..
i have a DataGrid that's bound to a table within an untyped DataSet. during the application's use, the table has rows added, updated, deleted, etc which is handled by a method in the page's code behind.
after the method executes the page reloads. my Page_Load handler explicitely states that it should be rebuilding the DataGrid regardless of the page being a postback or not since the display information in the datagrid isn't part of the viewstate. fine.
now, if i *refresh* the page (F5), the datagrid shows correctly. i've checked the dataset and it's table to see if there's any difference in content for after method execution and refresh: they're identical. i've also verified that my methods that rebuild the DataGrid are called after the data has been changed.
so that being said, why is the new content being ignored?
should i register a StartUpScript to force the form to submit? (i tested this and this does work, but there's gotta be a better way than making two trips to the server for a refresh).
for what it's worth, the datagrid is built with nearly all custom template columns.
toy code below
Code:
void Page_Load(object sender, System.EventArgs e){
if(!Page.isPostBack){
/* build the initial dataset & save it to a Session
* var for later use... */
}
buildDataGrid();
}
void buildDataGrid(){
//build & populate the datagrid
}
//called by a control in DataGrid, e.g. btn, ddl, cbx, etc
void aDataGridEvtHander(object sender, System.EventArgs e){
/* update a table in the dataset & save DataSet back to
* the Session var */
}
any thoughts? thanks in advance...
..:: mirirom ::..