Note that there are some explanatory texts on larger screens.

plurals
  1. POcustomize the filter option for a date colmn telerik grid
    primarykey
    data
    text
    <p>I am using telerik grid. I need to apply a filter for all the columns in my grid. Currenly I am customizing the filter option using the following code. By using the following code, I am removing the certain items for all the columns. But, for a date column could any one please tell me what are the possible options for filtering in the grid and how to customize those filtering options?</p> <p><strong>Code Behind</strong></p> <pre><code> protected void RGVTest_Init(object sender, EventArgs e) { GridFilterMenu menu = RGVTest.FilterMenu; int i = 0; while (i &lt; menu.Items.Count) { if (menu.Items[i].Text == "Between" || menu.Items[i].Text == "NotBetween") { menu.Items.RemoveAt(i); } else { i++; } } } </code></pre> <p>*<strong><em>Aspx:</em>*</strong> </p> <pre><code>&lt;telerik:RadGrid ID="RGVTest" runat="server" Skin="Vista" AllowPaging="True" AllowFilteringByColumn="true" AllowSorting="true" GridLines="None" OnItemCommand="RGVTest_ItemCommand" PageSize="10" OnNeedDataSource="RGVTest_NeedDataSource" OnItemDataBound="RGVTest_ItemDataBound" OnInit="RGVTest_Init"&gt; &lt;GroupingSettings CaseSensitive="false" /&gt; &lt;PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" /&gt; &lt;MasterTableView AutoGenerateColumns="False" CellSpacing="-1" &gt; &lt;NoRecordsTemplate&gt; &lt;div style="color: red"&gt; No Records to display! &lt;/div&gt; &lt;/NoRecordsTemplate&gt; &lt;Columns&gt; &lt;telerik:GridTemplateColumn DataField="SSN" ReadOnly="True" HeaderText="SSN" UniqueName="SSN" SortExpression="SSN"&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="LblSSN" runat="server" Text='&lt;%#Eval("SSN") %&gt;'&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;ItemStyle HorizontalAlign="Left" Width="5%" /&gt; &lt;/telerik:GridTemplateColumn&gt; &lt;telerik:GridTemplateColumn DataField="Date" HeaderText="Date" UniqueName="Date" SortExpression="Date"&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="LblDate" runat="server" Text='&lt;%#Eval("Date","{0:MM/dd/yyyy}") %&gt;'&gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;ItemStyle HorizontalAlign="Left" Width="4%" /&gt; &lt;/telerik:GridTemplateColumn&gt; &lt;/Columns&gt; &lt;/MasterTableView&gt; &lt;/telerik:RadGrid&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload