Postbacks with parent/child datagrid controls
I have a datagrid on a .aspx page, and another datagrid on a .ascx page. My
goal is to populate the "child" datagrid (the one from the control) depending
on the selected index of the parent datagrid. The child control gets the
DataKeyField of the selected index of the datagrid from the parent page to
use to populate it's datagrid.
So, when I call a sort, edit, or whatever from the child datagrid, it fires
a postback to the parent page, and so I have to reload the control in the
page_load area of of the parent page....fine so far.
My problem comes when I select a new item from the parent datagrid. The
page posts back, and then it reloads my child control, but it still has the
ID from the previously selected Item because it reloads the control before it
fires the DataGrid.OnSelectCommand function.
I tried to clear the placeholder that I load the control into, and reload
the control. This sort-of works...at this point there is 2 controls (one
loaded from page_load, and one from the selected index changed), but only one
Is there a way to actually DELETE or UNLOAD a control from the page or
placeholder, and actually reload it, as opposed to the placeHolder.Clear()
|All times are GMT. The time now is 10:29 AM.|
SEO by vBSEO ©2010, Crawlability, Inc.