In the Kendo Grid Column there are filter already applied on the column which are as follows :
1.Is equal to
2.Is not equal to
3.Is greater than or equal to
4.Is greater than
5.Is less than or equal to
6.Is less than
7.Is Null
8.Is no null
I want to add another one which is “Is In List” into grid column
Kendo Grid as I wanted to apply “Is In List” filter to BankStatementId Column.
` @helper BankStatementGrid()
{
@(
Html.Kendo().Grid<BankStatementRecon>()
.Name("gridBankStatement")
.Sortable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
.Navigatable()
.Scrollable()
.Filterable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5)
.PageSizes(new[] { "50", "500" }))
.HtmlAttributes(new { style = "height:850px;" })
.ToolBar(t =>
{
t.Custom().Text("Clear Filter").HtmlAttributes(new { id = "ClearFiltergridBS" });
//PARA-5759 below Custom() tool bar
t.Custom()
.Text("Export to Excel")
.HtmlAttributes(new { id = "export", style = "float:right" })
.Url(Url.Action("ExportToExcel", "AccountingTransactions", new { filter = "~", sort = "~", IsReconciled = false, rptFlag = 0, exportFileName = "BankStatement" }));
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Events(e => e.DataBound("onDataBound").Edit("onEdit"))
.DataSource(ds => ds
.Ajax()
.Events(e => e.Error("OnGridRequestError").RequestStart("HideErrorMessage"))
.PageSize(50)
.ServerOperation(true)
.Sort(sort => sort.Add("Dated").Descending())
.AutoSync(true)
.Model(model =>
{
model.Field(p => p.BankStatementId).Editable(false);
model.Field(p => p.Ledger).Editable(false);
model.Field(p => p.Dated).Editable(false);
model.Field(p => p.Description).Editable(false);
model.Field(p => p.RefNumber).Editable(false);
model.Field(p => p.BankAmount).Editable(false);
model.Field(p => p.TxAmount).Editable(false);
model.Field(p => p.Diff).Editable(false);
model.Field(p => p.Ledger).Editable(false);
model.Field(p => p.ReferenceId).Editable(false);
model.Field(p => p.Information).Editable(false);
model.Field(p => p.Result).Editable(false);
model.Field(p => p.Comments).Editable(true);
model.Id(p => p.BankStatementId);
})
.Read(r => r.Action("Read_OutstandingBankStatement", "AccountingTransactions"))
.Update(u => u.Action("Update_OutstandingBankStatement", "AccountingTransactions"))
)
.Columns(columns =>
{
columns.Bound(l => l.BankStatementId).Title("StatementId");
columns.Bound(l => l.Ledger).Filterable(f => f.Multi(true).Search(true).DataSource(source => source.Read(r => r.Action("GetBankLedgers", "AccountingTransactions"))));
columns.Bound(l => l.Dated).Format("{0:MM/dd/yyyy}");
columns.Bound(l => l.Description);
columns.Bound(l => l.BankAmount).Format("{0:C}");
columns.Bound(l => l.TxAmount).Format("{0:C}");
columns.Bound(l => l.Diff).Format("{0:C}");
columns.Bound(l => l.RefNumber).Title("Reference");
columns.Bound(l => l.Result).Width("100px");
columns.Bound(l => l.Information);
columns.Bound(l => l.Comments);
columns.Bound(l => l.ReferenceId);
})
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
)
}`
New contributor
Basant Gera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.