function GridLoad(args) { var gridDetailObj= $("#Grid").data("ejGrid"); gridDetailObj.commonQuery.queries = []; //cancella la query attuale e imposta la nuova gridDetailObj.commonQuery.where("tipoArticolo", 'equal',"TtipoServizio");
@(Html.EJ().GroupButton("filtroDettaglio").Width("100%").Height("100%").GroupButtonMode(GroupButtonMode.RadioButton) .ShowRoundedCorner(true) .Size(ButtonSize.Mini) .Items(item => { item.Add().Text("Servizi"); item.Add().Text("Prodotti"); }) .SelectedItemIndex(new List<int> { 0 }).ClientSideEvents(eve => eve.Select("filtraDettaglio")))
function filtraDettaglio(args) { $('#tipoArticolo').val(args.index==0?"TtipoServizio":"TtipoProdotto"); var gridDetailObj= $("#Grid").data("ejGrid");
gridDetailObj.commonQuery.queries = []; //cancella la query attuale e imposta la nuova gridDetailObj.commonQuery.where("tipoArticolo", 'equal', args.index==0?"TtipoServizio":"TtipoProdotto"); refreshGrid(); }
@(Html.EJ().Grid<SyncfusionMvcApplication9.OrdersView>("FlatGrid")
.Datasource((IEnumerable<object>)ViewBag.datasource)
.AllowFiltering()
.AllowSorting()
.Query("new ej.Query().where('OrderID', 'lessThan', 10252, false)")
.SortSettings(sort => sort.SortedColumns(col => col.Field("EmployeeID").Direction(SortOrder.Descending).Add()))
.FilterSettings(filter =>
{
filter.FilterType(FilterType.Menu);
})
.Columns(col =>
{
. . .
})
.ClientSideEvents(eve=>eve.TemplateRefresh("TR").QueryCellInfo("QueryCellInfo"))
) |
Great !!
You understood my issue perfectly.
Thank you very much