I am using v2014.1.403.45 of the ASP Ajax controls and was looking at implementing a Between and Not Between filter on my columns, the problem is the default implementation does not appear to support this functionality.
I know I can use the GridBoundColumn and use the DataType property to implement these filters but I also lose the formatting on the edit / insert, such as only allowing numeric entry in a GridNumericColumn. Is there a way to implement these additional search criteria use GridNumericColumn and GridDateTimeColumn?
Here is my current implementation.
<telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AutoGenerateColumns="False" PagerStyle-Position="Bottom" PageSize="20"
EnableLinqExpressions="False" AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="True" Skin="WebBlue"
DataSourceID="SqlDataSource1" OnItemDataBound="RadGrid1_ItemDataBound">
<MasterTableView EditMode="PopUp" AllowFilteringByColumn="true" CommandItemDisplay="Top" AllowMultiColumnSorting="true">
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />
<telerik:GridBoundColumn DataField="ReportKey" FilterControlAltText="Filter ReportKey column" HeaderText="ReportKey"
SortExpression="ReportKey" UniqueName="ReportKey">
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxReportKey" DataSourceID="SqlDataSource2" DataTextField="ReportKey" DataValueField="ReportKey"
AppendDataBoundItems="true" CheckBoxes="true" runat="server" EmptyMessage="Select Report Key's">
</telerik:RadComboBox>
<asp:ImageButton ID="SearchButton" runat="server" AlternateText="Filter" ToolTip="Filter by Report Key's"
OnClick="SearchButton_Click" ImageUrl="~/search.png" />
</FilterTemplate>
</telerik:GridBoundColumn>
<telerik:GridNumericColumn DataField="PrepTime" AllowFiltering="true" HeaderText="PrepTime"
SortExpression="PrepTime" UniqueName="PrepTime">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn DataField="TravelTime" AllowFiltering="true" HeaderText="TravelTime"
SortExpression="TravelTime" UniqueName="TravelTime">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn DataField="VisitTime" AllowFiltering="true" HeaderText="VisitTime"
SortExpression="VisitTime" UniqueName="VisitTime">
</telerik:GridNumericColumn>
<telerik:GridCheckBoxColumn DataField="IsVerified" AllowFiltering="true" HeaderText="IsVerified"
SortExpression="IsVerified" UniqueName="IsVerified">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DataField="IsDeleted" AllowFiltering="true" HeaderText="IsDeleted"
SortExpression="IsDeleted" UniqueName="IsDeleted">
</telerik:GridCheckBoxColumn >
<telerik:GridBoundColumn DataField="LastSavedByUID" AllowFiltering="true" HeaderText="LastSavedByUID"
SortExpression="LastSavedByUID" UniqueName="LastSavedByUID">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="DateLastSaved" AllowFiltering="true" HeaderText="DateLastSaved"
SortExpression="DateLastSaved" UniqueName="DateLastSaved">
</telerik:GridDateTimeColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowDragToGroup="True">
<Selecting AllowRowSelect="true" />
</ClientSettings>
<FilterMenu EnableImageSprites="False"></FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
</telerik:RadGrid>
I know I can use the GridBoundColumn and use the DataType property to implement these filters but I also lose the formatting on the edit / insert, such as only allowing numeric entry in a GridNumericColumn. Is there a way to implement these additional search criteria use GridNumericColumn and GridDateTimeColumn?
Here is my current implementation.
<telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AutoGenerateColumns="False" PagerStyle-Position="Bottom" PageSize="20"
EnableLinqExpressions="False" AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="True" Skin="WebBlue"
DataSourceID="SqlDataSource1" OnItemDataBound="RadGrid1_ItemDataBound">
<MasterTableView EditMode="PopUp" AllowFilteringByColumn="true" CommandItemDisplay="Top" AllowMultiColumnSorting="true">
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />
<telerik:GridBoundColumn DataField="ReportKey" FilterControlAltText="Filter ReportKey column" HeaderText="ReportKey"
SortExpression="ReportKey" UniqueName="ReportKey">
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxReportKey" DataSourceID="SqlDataSource2" DataTextField="ReportKey" DataValueField="ReportKey"
AppendDataBoundItems="true" CheckBoxes="true" runat="server" EmptyMessage="Select Report Key's">
</telerik:RadComboBox>
<asp:ImageButton ID="SearchButton" runat="server" AlternateText="Filter" ToolTip="Filter by Report Key's"
OnClick="SearchButton_Click" ImageUrl="~/search.png" />
</FilterTemplate>
</telerik:GridBoundColumn>
<telerik:GridNumericColumn DataField="PrepTime" AllowFiltering="true" HeaderText="PrepTime"
SortExpression="PrepTime" UniqueName="PrepTime">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn DataField="TravelTime" AllowFiltering="true" HeaderText="TravelTime"
SortExpression="TravelTime" UniqueName="TravelTime">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn DataField="VisitTime" AllowFiltering="true" HeaderText="VisitTime"
SortExpression="VisitTime" UniqueName="VisitTime">
</telerik:GridNumericColumn>
<telerik:GridCheckBoxColumn DataField="IsVerified" AllowFiltering="true" HeaderText="IsVerified"
SortExpression="IsVerified" UniqueName="IsVerified">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DataField="IsDeleted" AllowFiltering="true" HeaderText="IsDeleted"
SortExpression="IsDeleted" UniqueName="IsDeleted">
</telerik:GridCheckBoxColumn >
<telerik:GridBoundColumn DataField="LastSavedByUID" AllowFiltering="true" HeaderText="LastSavedByUID"
SortExpression="LastSavedByUID" UniqueName="LastSavedByUID">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="DateLastSaved" AllowFiltering="true" HeaderText="DateLastSaved"
SortExpression="DateLastSaved" UniqueName="DateLastSaved">
</telerik:GridDateTimeColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowDragToGroup="True">
<Selecting AllowRowSelect="true" />
</ClientSettings>
<FilterMenu EnableImageSprites="False"></FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
</telerik:RadGrid>