public static MvcHtmlString RenderItensDominioComboBox(this HtmlHelper helper, string nome, string nomeDominio, object htmlAttributes = null, bool isToShowItemValue = false) { ComboBoxBuilder comboBoxBuilder = helper.Kendo().ComboBox(); comboBoxBuilder.Name(nome); comboBoxBuilder.DataValueField("Vl_Item_Dominio"); comboBoxBuilder.DataTextField("Dc_Item_Dominio"); if (htmlAttributes != null) { comboBoxBuilder.HtmlAttributes(htmlAttributes); } comboBoxBuilder.DataSource(dataSource => { dataSource.Read("ItensDominio", "Dominios", new { nomeDominio = nomeDominio, isToShowItemValue = isToShowItemValue }); }); return(MvcHtmlString.Create(comboBoxBuilder.ToHtmlString())); }
public static ComboBoxBuilder ConditionalChange(this ComboBoxBuilder builder, string handler, bool condition) { if (condition) { builder.Events(e => e.Change(handler)); } return(builder); }
public static ComboBoxBuilder ConditionallyCascadeFrom(this ComboBoxBuilder builder, string cascadeFromId, bool condition) { if (condition) { builder.CascadeFrom(cascadeFromId); } return(builder); }
public static ComboBoxBuilder Width(this ComboBoxBuilder builder, int widthPixel) { return(builder.HtmlAttributes(new { style = string.Format("width: {0}px", widthPixel) })); }
public ComboBoxBuilderTests() { combobox = ComboBoxTestHelper.CreateComboBox(); builder = new ComboBoxBuilder(combobox); }
public ComboBoxBuilderTests() { combobox = ComboBoxTestHelper.CreateComboBox(); builder = new ComboBoxBuilder(combobox); }