protected void cbCars_ItemsRequestedByFilterCondition(object source, DevExpress.Web.ASPxEditors.ListEditItemsRequestedByFilterConditionEventArgs e) { var data = MyDataSource.GetData(cbLocation.Text); var query = from r in data where r.Text.StartsWith(e.Filter) select r; cbCars.DataSource = query.Skip(e.BeginIndex).Take(e.EndIndex - e.BeginIndex + 1); cbCars.DataBind(); }
protected void cbCars_ItemRequestedByValue(object source, DevExpress.Web.ASPxEditors.ListEditItemRequestedByValueEventArgs e) { if (e.Value != null && e.Value is int) { var data = MyDataSource.GetData(cbLocation.Text); var query = from r in data where r.Value == (int)e.Value select r; cbCars.DataSource = query; cbCars.DataBind(); } }