Posted 16 September 2020, 4:49 am EST - Updated 29 September 2022, 1:47 am EST
I am using the sample at https://demos.componentone.com/ASPNET/MVCExplorer/FlexGrid/Searching to add a search to my FlexGrid. I am unable to clear the search text and show all the grid data again. I have tried deleting the text and clicking on the “X” on the control. Only entering a blank resets the search to show all the data again. I don’t see anything obvious in the sample I referenced above.
@using (Html.BeginForm("Save", "Bill"))
{
@Html.AntiForgeryToken()
@(Html.C1().FlexGrid().Id("policyGrid")
.CssClass("custom")
.IsReadOnly(true)
.SortingType(C1.Web.Mvc.Grid.AllowSorting.SingleColumn)
.Bind(ib => ib.Update(Url.Action("GridUpdate")).OnClientQueryComplete("UpdateComplete")
.Create(Url.Action("GridCreate"))
.Delete(Url.Action("GridDelete"))
.DisableServerRead(true)
.Bind(Model.Policies))
.AutoGenerateColumns(false)
.AlternatingRowStep(0)
.IsReadOnly(false)
.ShowColumnFooters(true, "Total")
.Columns(c =>
{
foreach (var col in Model.ColumnList)
{
c.Add(col);
}
})
.AllowAddNew(true)
.AllowDelete(true)
.ShowErrors(true)
.OnClientLoadedRows("fixDefaultJSAlert"))
@(Html.C1().FlexGridSearch("#searchGrid")
.Grid("policyGrid")
.Delay(500)
.Placeholder("Enter filter text here"))
Is there an option I don’t see or an event handler I should to use?
Thanks,
Eric