This example demonstrates how to changed the 'city' filter combobox values based on the 'country' filter combobox.
Question Comments
Added By: Sinan EGE 1 at: 6/19/2015 5:56:41 PM
An exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll but was not handled in user code
protected void dgListe_CellEditorInitialize(object sender, ASPxGridViewEditorEventArgs e)
{
if (e.Column.FieldName == "ilceid")
{
ASPxComboBox cmb = e.Editor as ASPxComboBox;
cmb.ClientInstanceName = "cmb2";
cmb.Callback += new DevExpress.Web.CallbackEventHandlerBase(cmb_Callback);
cmb.DataSourceID = "dsIlce";
}
else if (e.Column.FieldName == "sehirid")
{
ASPxComboBox cmb = e.Editor as ASPxComboBox;
cmb.ClientInstanceName = "cmb1";
cmb.ClientSideEvents.SelectedIndexChanged = "function (s, e) { cmb2.PerformCallback(s.GetValue()); }";
cmb.ClientSideEvents.Init = "function (s, e) { cmb2.PerformCallback(s.GetValue()); }";
}
}
void cmb_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
{
ASPxComboBox cmb = sender as ASPxComboBox;
if (String.IsNullOrEmpty(e.Parameter))
cmb.Items.Clear();
else
{
dsIlce.SelectParameters[0].DefaultValue = e.Parameter;
cmb.DataBindItems();
}
}