public SelectBoxBuilder SelectBoxFor <TProperty>(Expression <Func <TModel, TProperty> > expression) { SelectBoxBuilder selectBoxBuilder = SelectBox(); selectBoxBuilder.PrepareEditorFor(base.Html, expression); return(selectBoxBuilder); }
public static SelectBoxBuilder DateRangeCommonConfigs(this SelectBoxBuilder selectBox) { return(selectBox .DisplayExpr("text") .ValueExpr("value") .SearchEnabled(false) .DataSource(new JS("dateHelper.items.getDateRange(false)")) .DropDownButtonTemplate("<span class='batch-icon batch-icon-md batch-icon-calendar text-primary' />")); }
public static SelectBoxBuilder ActionCommonConfigs(this SelectBoxBuilder selectBox) { return(selectBox .Placeholder("Actions..") .DisplayExpr("ActionName") .ValueExpr("ActionName") .SearchEnabled(false) //.OnSelectionChanged("function(e) { alert(e.selectedItem.ActionName); e.component.reset(); }") .DropDownButtonTemplate("<span class='batch-icon batch-icon-menu-pull-down text-danger' />") .ItemTemplate("<span class='<%= Icon %> text-primary' /> <%= DisplayName %>")); }