This is a migrated thread and some comments may be shown as answers.

one column with filtering others without?

2 Answers 172 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon-Jon Kershaw
Top achievements
Rank 2
Jon-Jon Kershaw asked on 11 Feb 2009, 03:45 PM
I looked through all the online help but can't seem to find the option to only have one column out of 5 with the option for filtering.  Example:  On the gridboundcolumn when i set the currentfilterfunction="nofilter" that doesn't work.  I'm assuming that is used for programmatically assigning the filter as a default preset and it doesn't work for what I am trying to do.  so can anyone suggest how i'd go about assigning a single column with filter options and the others without?  Thanks in advance.

     <telerik:RadGrid ID="RadGridZoneList" runat="server" GridLines="None" Skin="Vista" 
                    AutoGenerateColumns="False" AllowPaging="True"   
                    OnPageIndexChanged="RadGridZoneList_PageIndexChanged"   
                    GroupingSettings-CaseSensitive="false" EnableLinqExpressions="False" 
                    CellPadding="0" AllowFilteringByColumn="True" AllowSorting="True"   
                    OnItemCommand="RadGridZoneList_ItemCommand" OnInit="RadGridZoneList_Init">  
                    <HeaderContextMenu EnableTheming="True" Skin="Vista">  
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    </HeaderContextMenu> 
                    <MasterTableView> 
                        <NoRecordsTemplate> 
                            No Records Found  
                        </NoRecordsTemplate> 
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn HeaderText="Zone Id" UniqueName="Zone_id" DataField="Zone_id" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="CS#" UniqueName="Cs_no" DataField="Cs_no">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Event Id" UniqueName="Event_id" DataField="Event_id" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Event Description" UniqueName="Event_description" DataField="Event_description" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Comment" UniqueName="comment" DataField="comment" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <GroupingSettings CaseSensitive="False" /> 
                    <FilterMenu EnableTheming="True" Skin="Vista">  
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    </FilterMenu> 
                </telerik:RadGrid> 

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 12 Feb 2009, 04:17 AM
Hello Jon,

Set the AllowFiltering property of the corresponding column to false in order to disable the filtering function for the column. See the example.

ASPX:
<telerik:RadGrid ID="RadGridZoneList" runat="server" GridLines="None" Skin="Vista" AutoGenerateColumns="False" AllowPaging="True" OnPageIndexChanged="RadGridZoneList_PageIndexChanged"  GroupingSettings-CaseSensitive="false" EnableLinqExpressions="False" AllowFilteringByColumn="True" AllowSorting="True" OnItemCommand="RadGridZoneList_ItemCommand" OnInit="RadGridZoneList_Init">                     
       <MasterTableView> 
              <Columns>  
                    <telerik:GridBoundColumn HeaderText="Zone Id" UniqueName="Zone_id" DataField="Zone_id" AllowFiltering="false">   
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn HeaderText="CS#" UniqueName="Cs_no" DataField="Cs_no">   
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn HeaderText="Event Id" UniqueName="Event_id" DataField="Event_id" AllowFiltering="false">   
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn HeaderText="Event Description" UniqueName="Event_description" DataField="Event_description" AllowFiltering="false">   
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn HeaderText="Comment" UniqueName="comment" DataField="comment" AllowFiltering="false">   
                    </telerik:GridBoundColumn>  
              </Columns>  
       </MasterTableView> 
</telerik:RadGrid>  

Thanks,
Shinu.
0
Jon-Jon Kershaw
Top achievements
Rank 2
answered on 12 Feb 2009, 02:59 PM
AWESOME! thanks.
Tags
Grid
Asked by
Jon-Jon Kershaw
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Jon-Jon Kershaw
Top achievements
Rank 2
Share this question
or