Hello Team,
Please suggest me how to Save the Filter Text Value and Bind it Back to the Filter Text Box on Telerik Grid Reload as my requirement need to Bind the Filter text until the User Logs Off the system. I am using "2011.2.712.40" Telerik Version in my Project.
The Code I am using for my Grid is:
<div id="CmeGrid" style="padding-bottom: 5px;">
<telerik:RadGrid ID="rdGrdInbox" runat="server" AllowFilteringByColumn="True" AllowSorting="True"
AllowPaging="True" CellSpacing="0" GridLines="None" AutoGenerateColumns="False"
PageSize="15" OnItemCommand="rdGrdInbox_ItemCommand" OnItemCreated="rdGrdInbox_ItemCreated"
Width="100%">
<MasterTableView DataKeyNames="grant_id">
<CommandItemSettings ExportToPdfText="Export to PDF" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
</ExpandCollapseColumn>
<Columns>
<telerik:GridTemplateColumn DataField="action_required" AllowFiltering="true" SortExpression="action_required"
UniqueName="action_required">
<HeaderTemplate>
<asp:LinkButton ID="lblheaderActionItems" runat="server" Font-Bold="true" Font-Underline="false"
CommandName='Sort' CommandArgument='action_required'>Action required</asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="btnAction" runat="server" Font-Underline="true" ForeColor="Blue"
Text='<%#Eval("action_required") %>' CommandName="edit" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="grant_display_id" HeaderText="Request ID"
SortExpression="grant_display_id" UniqueName="grant_display_id" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="grant_id" HeaderText="Request ID"
Visible="false" SortExpression="grant_id" UniqueName="grant_id" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="activity_type" HeaderText="Type of Request"
SortExpression="grant_id" UniqueName="activity_type" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn AutoPostBackOnFilter="true" FilterControlWidth="100px"
DataField="date_submitted" HeaderText="Date Submitted" SortExpression="date_submitted"
UniqueName="date_submitted" PickerType="DatePicker" DataFormatString="{0:d}"
FilterDelay="500" ShowFilterIcon="false">
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="grant_external_status"
HeaderText="Status" SortExpression="grant_status" UniqueName="grant_status" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<%--abdulr--%>
<telerik:GridTemplateColumn DataField="activity_title" FilterControlWidth="200px"
AllowFiltering="true" SortExpression="activity_title" UniqueName="activity_title">
<HeaderTemplate>
<asp:LinkButton ID="lblheaderProgramTitle" runat="server" Font-Bold="true" Font-Underline="false"
CommandName='Sort' CommandArgument='program_title'>Activity Title</asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="btnTitle" runat="server" Font-Underline="true" ForeColor="Blue"
Text='<%#Eval("activity_title") %>' CommandName="select" />
</ItemTemplate>
<ItemStyle CssClass="inboxgridWrap" />
</telerik:GridTemplateColumn>
<telerik:GridNumericColumn FilterControlWidth="50px" DataField="requested_amount"
HeaderText="Requested Amount" SortExpression="requested_amount" UniqueName="requested_amount"
ShowFilterIcon="true" HeaderStyle-Width="90px" DataType="System.Decimal">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn FilterControlWidth="50px" DataField="approved_amount"
HeaderText="Approved Amount" SortExpression="approved_amount" UniqueName="approved_amount"
ShowFilterIcon="true" HeaderStyle-Width="90px" DataType="System.Decimal">
</telerik:GridNumericColumn>
<telerik:GridTemplateColumn HeaderText="View/Print Agreement" SortExpression="loa_signoff_ind"
AllowFiltering="false" ShowFilterIcon="false" HeaderStyle-Font-Bold="true">
<ItemTemplate>
<asp:LinkButton runat="server" ID="btn_view_print_agreement" Font-Underline="true"
ForeColor="Blue" Text='View/Print Agreement' CommandName="viewloa"></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Font-Bold="True" />
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<GroupingSettings CaseSensitive="false" />
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
</telerik:RadGrid>
</div>
Please go through the Link Below to Understand my requirement better.
LINK: http://screencast.com/t/Ip7dbtmg
Please let me know how I can save the Filter Criteria and restore on reload of Grid or if there is any inbuilt property of Telerik to do the same operation which I want. Please help me at the earliest.
Thanks,
Saurabh
Please suggest me how to Save the Filter Text Value and Bind it Back to the Filter Text Box on Telerik Grid Reload as my requirement need to Bind the Filter text until the User Logs Off the system. I am using "2011.2.712.40" Telerik Version in my Project.
The Code I am using for my Grid is:
<div id="CmeGrid" style="padding-bottom: 5px;">
<telerik:RadGrid ID="rdGrdInbox" runat="server" AllowFilteringByColumn="True" AllowSorting="True"
AllowPaging="True" CellSpacing="0" GridLines="None" AutoGenerateColumns="False"
PageSize="15" OnItemCommand="rdGrdInbox_ItemCommand" OnItemCreated="rdGrdInbox_ItemCreated"
Width="100%">
<MasterTableView DataKeyNames="grant_id">
<CommandItemSettings ExportToPdfText="Export to PDF" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
</ExpandCollapseColumn>
<Columns>
<telerik:GridTemplateColumn DataField="action_required" AllowFiltering="true" SortExpression="action_required"
UniqueName="action_required">
<HeaderTemplate>
<asp:LinkButton ID="lblheaderActionItems" runat="server" Font-Bold="true" Font-Underline="false"
CommandName='Sort' CommandArgument='action_required'>Action required</asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="btnAction" runat="server" Font-Underline="true" ForeColor="Blue"
Text='<%#Eval("action_required") %>' CommandName="edit" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="grant_display_id" HeaderText="Request ID"
SortExpression="grant_display_id" UniqueName="grant_display_id" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="grant_id" HeaderText="Request ID"
Visible="false" SortExpression="grant_id" UniqueName="grant_id" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="activity_type" HeaderText="Type of Request"
SortExpression="grant_id" UniqueName="activity_type" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn AutoPostBackOnFilter="true" FilterControlWidth="100px"
DataField="date_submitted" HeaderText="Date Submitted" SortExpression="date_submitted"
UniqueName="date_submitted" PickerType="DatePicker" DataFormatString="{0:d}"
FilterDelay="500" ShowFilterIcon="false">
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn FilterControlWidth="80%" DataField="grant_external_status"
HeaderText="Status" SortExpression="grant_status" UniqueName="grant_status" ShowFilterIcon="true">
</telerik:GridBoundColumn>
<%--abdulr--%>
<telerik:GridTemplateColumn DataField="activity_title" FilterControlWidth="200px"
AllowFiltering="true" SortExpression="activity_title" UniqueName="activity_title">
<HeaderTemplate>
<asp:LinkButton ID="lblheaderProgramTitle" runat="server" Font-Bold="true" Font-Underline="false"
CommandName='Sort' CommandArgument='program_title'>Activity Title</asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="btnTitle" runat="server" Font-Underline="true" ForeColor="Blue"
Text='<%#Eval("activity_title") %>' CommandName="select" />
</ItemTemplate>
<ItemStyle CssClass="inboxgridWrap" />
</telerik:GridTemplateColumn>
<telerik:GridNumericColumn FilterControlWidth="50px" DataField="requested_amount"
HeaderText="Requested Amount" SortExpression="requested_amount" UniqueName="requested_amount"
ShowFilterIcon="true" HeaderStyle-Width="90px" DataType="System.Decimal">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn FilterControlWidth="50px" DataField="approved_amount"
HeaderText="Approved Amount" SortExpression="approved_amount" UniqueName="approved_amount"
ShowFilterIcon="true" HeaderStyle-Width="90px" DataType="System.Decimal">
</telerik:GridNumericColumn>
<telerik:GridTemplateColumn HeaderText="View/Print Agreement" SortExpression="loa_signoff_ind"
AllowFiltering="false" ShowFilterIcon="false" HeaderStyle-Font-Bold="true">
<ItemTemplate>
<asp:LinkButton runat="server" ID="btn_view_print_agreement" Font-Underline="true"
ForeColor="Blue" Text='View/Print Agreement' CommandName="viewloa"></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Font-Bold="True" />
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<GroupingSettings CaseSensitive="false" />
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
</telerik:RadGrid>
</div>
Please go through the Link Below to Understand my requirement better.
LINK: http://screencast.com/t/Ip7dbtmg
Please let me know how I can save the Filter Criteria and restore on reload of Grid or if there is any inbuilt property of Telerik to do the same operation which I want. Please help me at the earliest.
Thanks,
Saurabh