public static MVCxColumnComboBoxProperties CreateComboBoxColumnProperties() { MVCxColumnComboBoxProperties p = new MVCxColumnComboBoxProperties(); p.CallbackRouteValues = new { Controller = "Home", Action = "CountryComboBox" }; p.ValueField = "CountryID"; p.TextField = "CountryName"; p.ValueType = typeof(int); p.CallbackPageSize = 20; p.DropDownStyle = DropDownStyle.DropDown; p.BindList(E4425.Models.DataProvider.GetCountries()); return(p); }
protected MVCxColumnComboBoxProperties CreateCountryComboBox() { MVCxColumnComboBoxProperties cs = new MVCxColumnComboBoxProperties(); cs.CallbackRouteValues = new { Controller = "Home", Action = "ComboBoxCountryPartial" }; cs.Width = Unit.Percentage(100); cs.TextField = "CountryName"; cs.ValueField = "CountryId"; cs.ValueType = typeof(int); cs.IncrementalFilteringDelay = 1000; cs.IncrementalFilteringMode = IncrementalFilteringMode.Contains; cs.FilterMinLength = 2; cs.CallbackPageSize = 20; cs.ClientSideEvents.SelectedIndexChanged = "CountriesCombo_SelectedIndexChanged"; cs.BindList(WorldCities.Countries.ToList()); return(cs); }
protected MVCxColumnComboBoxProperties CreateCityComboBox() { MVCxColumnComboBoxProperties cs = new MVCxColumnComboBoxProperties(); cs.CallbackRouteValues = new { Controller = "Home", Action = "ComboBoxCityPartial" }; cs.Width = Unit.Percentage(100); cs.CallbackPageSize = 20; cs.TextField = "CityName"; cs.ValueField = "CityId"; cs.ValueType = typeof(int); cs.IncrementalFilteringDelay = 1000; cs.IncrementalFilteringMode = IncrementalFilteringMode.Contains; cs.FilterMinLength = 2; cs.BindList(OnItemsRequestedByFilterCondition, OnItemRequestedByValue); cs.ClientSideEvents.BeginCallback = "CitiesCombo_BeginCallback"; cs.ClientSideEvents.EndCallback = "CitiesCombo_EndCallback"; return(cs); }
public static MVCxColumnComboBoxProperties CreateComboBox(string controller, string action, string textField, string valueField, object dataObject) { MVCxColumnComboBoxProperties combo = new MVCxColumnComboBoxProperties { CallbackRouteValues = new { Controller = controller, Action = action }, TextField = textField, ValueField = valueField, ValueType = typeof(string), CallbackPageSize = 15, DropDownStyle = DropDownStyle.DropDown }; combo.BindList(dataObject); return(combo); }
//[Log("EehMonitorOperatorsComboBoxPartialInGrid")] public ActionResult EehMonitorOperatorsComboBoxPartialInGrid() { MVCxColumnComboBoxProperties p = new MVCxColumnComboBoxProperties(); p.CallbackPageSize = 30; p.CallbackRouteValues = new { Controller = "Administration", Action = "EehMonitorOperatorsComboBoxPartialInGrid" }; p.FilterMinLength = 0; p.Width = Unit.Percentage(100); p.DropDownStyle = DropDownStyle.DropDownList; p.Columns.Add("FullName"); p.Columns.Add("MonitorOperatorCode"); p.TextField = "MonitorOperatorCode"; p.ValueField = "MonitorOperatorCode"; p.ValueType = typeof(string); //p.BindList(CoreDbContextService.Db.GetMonitorOperators("EEH").OrderBy(mo=>mo.FullName)); p.BindList(CoreDbContextService.Db.GetEehMonitorOperatorsRange , CoreDbContextService.Db.GetEehMonitorOperatorsByOperator); return(GridViewExtension.GetComboBoxCallbackResult(p)); }