Hi,
can't figure out how to set initial gridfilter value (stringfilter) from code (server)..
Could you give a small example ?
Martin
Printable View
Hi,
can't figure out how to set initial gridfilter value (stringfilter) from code (server)..
Could you give a small example ?
Martin
Hi Martin,
Please use StringFilter's Value property.
Code:StringFilter f = new StringFilter();
f.Value = "initial value";
I'm not creating the filters in code but I can do that offcourse. But just wondering how to set the initial value when having this:
I can't set an ID for the filters, so how can I get the right filter. Only by index ?Code:<ext:GridFilters runat="server" ID="gfIssues" Local="true">
<Filters>
<ext:NumericFilter DataIndex="ID" />
<ext:StringFilter DataIndex="cIssueSoort" />
<ext:StringFilter DataIndex="cGroep" />
<ext:StringFilter DataIndex="cTitel" />
<ext:NumericFilter DataIndex="nKlantID" />
<ext:StringFilter DataIndex="clNaamContact" />
<ext:StringFilter DataIndex="cPakket" />
<ext:StringFilter DataIndex="cTags" />
<ext:StringFilter DataIndex="cBuildNummer" />
<ext:DateFilter DataIndex="nDatumAanmaak" AutoDataBind="true">
<DatePickerOptions runat="server" Format="dd-MM-yyyy" TodayText="Now" />
</ext:DateFilter>
<ext:StringFilter DataIndex="nTijd" />
<ext:StringFilter DataIndex="cClusterNaam" />
</Filters>
</ext:GridFilters>
And also..how to set the numericfilter value (as this property is non existing) ?
Martin
Or search for DataIndex. Maybe, it would be better to just add a StringFilter instance with all required setting to the Filters collection.
There are the EqualValue, GreaterThanValue and LessThanValue properties at your service.