Kem Arda
Posted
on Oct 1, 2009
(permalink)
When i set AllowFilteringByColumn property of RadGrid to "True", all columns can be filtered. What i want to do is to filter records by only one column. How can i do that?
Thanks...
Posted
on Oct 1, 2009
(permalink)
Hello Kem Arda,
You can set the AllowFitering property for the every column other than the one with which you want to filter the grid to false. For example, check out the code below:
aspx:
Thanks
Princy.
Posted
on Jun 21, 2011
(permalink)
hi,
i am Srinivas
here in my project i am using RadGrid and filter concept in RadGrid Columns. i want to filter records on RadGrid by only one column.
for that i was set the AllowFiltering="false" to unwanted columns in RadGrid.
but filtering concept is not working in my project.
the following is the source code for radgrid...
<telerik:RadGrid ID="RadGrid1" Skin="WebBlue" runat="server" AllowFilteringByColumn="True"
AutoGenerateColumns="False" ShowStatusBar="True" GridLines="None"
AllowPaging="True" PageSize="20" AllowSorting="True"
onitemdatabound="RadGrid1_ItemDataBound">
<MasterTableView GroupLoadMode="Client" AllowFilteringByColumn="true">
<Columns>
<telerik:GridTemplateColumn UniqueName="lotid" HeaderText="Lot Id" AllowFiltering="false" Display="false" >
<ItemTemplate>
<asp:Label ID="lot_id" runat="server" Text='<%#Eval("lot_id") %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="id" HeaderText="Schedule ActID" AllowFiltering="false" Display="false">
<ItemTemplate>
<asp:Label ID="actid" runat="server" Text='<%#Eval("schedule_Activities_id") %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="ActId" HeaderText="Schedule ActID" AllowFiltering="false" Display="false">
<ItemTemplate>
<telerik:RadTextBox ID="acttype" runat="server" Text='<%#Eval("act_type")%>'></telerik:RadTextBox>
<%-- <asp:Label ID="acttype" runat="server" Text='<%#Eval("act_type")%>'></asp:Label>--%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="delayreasoncode" HeaderText="Schedule ActID" AllowFiltering="false" Display="false">
<ItemTemplate>
<asp:Label ID="delayreasoncode" runat="server" Text='<%#Eval("delay_reason_code") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Activity Description" UniqueName="activity_desc" AllowFiltering="true">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="30%" Wrap="true" />
<ItemTemplate>
<asp:Label ID="actdesc" runat="server" Text='<%#Eval("activity_desc") %>' Width="200px" ToolTip= '<%#Eval("activity_desc") %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<DataBinding SelectMethod="GetDataAndCount" EnableCaching="true" />
</ClientSettings>
</telerik:RadGrid>
please help me..
thank ypu
D.Srinivasa
Posted
on Jun 21, 2011
(permalink)
Hello Srinivas,
In order to implement filtering in GridTemplateColumn, set
DataField property in the template column.
aspx:
Thanks,
Princy.