Feb 09, 2009, 4:46 PM
Databind / Reload Store and GridPanel Problem
I have a combobox at the top of the page with two choices (A and B). Page loads with option A selected. There is a gridpanel tied to a store which loads information.
Now I select choice B on the combobox. This basically changes the store (new query for new information from db) to get new information and databinds it again.
The gridpanel changes its data to correspond to the new query. The problem comes in when I try to read column values in the gridpanel, all data is from previous store (the one that corresponds to option A). Am I missing a command? The data that I see in the gridpanel changed when I changed from Option A to Option B, but the underlying data hasn't changed.
For example:
On a side note, I can't seem to find out how to make the coolite combobox just reload the page on change of selected item. If user changes from Option A to Option B, make the page reload.. (Basically make the coolite control behave like a regular drop down list). The reason I don't use a regular drop down list is because it is not allowed in the TOPBAR/TOOLBAR of a panel.
Thanks for the help!
Now I select choice B on the combobox. This basically changes the store (new query for new information from db) to get new information and databinds it again.
The gridpanel changes its data to correspond to the new query. The problem comes in when I try to read column values in the gridpanel, all data is from previous store (the one that corresponds to option A). Am I missing a command? The data that I see in the gridpanel changed when I changed from Option A to Option B, but the underlying data hasn't changed.
For example:
string strSQL;
RowSelectionModel sm = this.gpnlProjectList.SelectionModel.Primary as RowSelectionModel;
string ID = sm.SelectedRow.RecordID as string;
ID never changes. It always stays the same as whatever option was loaded on page load. I think there is a command I need to run after user changes Combobox besides Store1.DataBind(). I am hoping someone out there can help.On a side note, I can't seem to find out how to make the coolite combobox just reload the page on change of selected item. If user changes from Option A to Option B, make the page reload.. (Basically make the coolite control behave like a regular drop down list). The reason I don't use a regular drop down list is because it is not allowed in the TOPBAR/TOOLBAR of a panel.
Thanks for the help!