Sep 26, 2012, 10:06 AM
Gridpanel: dynamically reload combobox
Hi,
I have a problem to reload a combobox in a gridpanel dynamically; I have two gridPanel (north and sud) a I want that when i select a row in a grindpanel north, a combobox in a gridpanel south reloads its values dynamically. Instead I get an error JS.
Here my code:
In the gridpanel north I have a Direct event when I change the row:
In the code behind:
The error show when execute:
Thank you!
Stefano Lonati
I have a problem to reload a combobox in a gridpanel dynamically; I have two gridPanel (north and sud) a I want that when i select a row in a grindpanel north, a combobox in a gridpanel south reloads its values dynamically. Instead I get an error JS.
Here my code:
In the gridpanel north I have a Direct event when I change the row:
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single">
<DirectEvents>
<Select OnEvent="RowSelect" Buffer="250">
<EventMask ShowMask="true" Msg="Loading..." MinDelay="500" />
<ExtraParams>
<ext:Parameter Name="ID" Value="record.data.ID" Mode="Raw" />
</ExtraParams>
</Select>
</DirectEvents>
</ext:RowSelectionModel>
</SelectionModel>
In the code behind:
protected void RowSelect(object sender, DirectEventArgs e)
{
string ID = e.ExtraParams["ID"];
oDB.OpenConnection();
oDB.populateComboBox(cmbFinalSteps, "SELECT ID, DESCRIPTION FROM TB_PROJECTTYPESTEPS WHERE ID_PROJECTTYPE = " + ID + " ORDER BY STEPORDER", "ID", "DESCRIPTION", "", "", CommandType.Text);
cmbFinalSteps.GetStore().DataBind();
cmbFinalSteps.Render();
oDB.CloseConnection();
this.BindDataSteps(ID);
this.BindDataConditions(ID);
}
The error show when execute:
cmbFinalSteps.Render();
Can someone help me please?Thank you!
Stefano Lonati