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

Radgrid Excel Filter columns options menu

2 Answers 214 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Percival
Top achievements
Rank 1
Percival asked on 23 May 2017, 11:50 PM

Hi Good day to All,

 

I would like to ask how to specify column names which will

appear on "Columns" part of the radgrid Excel Filter menu.

We have a checkbox template column and we don't want it to

be included in the list. as for the other columns they are auto generated.

thanks in advance

 

here the code for rad grid

 

<telerik:RadGrid ID="rgTestGrid" runat="server" AutoPostBackOnFilter="true" Skin="Silk" Width="100%" Height="100%" EnableViewState="false" AllowPaging="true"  AllowSorting="True" GridLines="None" AllowMultiRowSelection="False" AllowFilteringByColumn="true" FilterType="HeaderContext" EnableHeaderContextMenu="true"  EnableHeaderContextFilterMenu="true" CssClass="table_RadGrid" Style="overflow-y: hidden; width: 150%; border-left-width: 1px; margin-right:100px"  HeaderStyle-BackColor="#5897ce"  HeaderStyle-Font-Size="13px"
HeaderStyle-BorderColor="#1e486d"   HeaderStyle-Font-Bold="true"  HeaderStyle-ForeColor="White" HeaderStyle-CssClass="Header-Grid-Banking Checkbox-Grid-Banking">
                            <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed" CommandItemSettings-ShowExportToExcelButton="true" CommandItemSettings-ShowRefreshButton="True"
                                CommandItemSettings-ShowExportToPdfButton="True" CommandItemSettings-ShowExportToWordButton="True" CommandItemSettings-ShowExportToCsvButton="True">
                                <Columns>
                                    <telerik:GridTemplateColumn  ReadOnly="true" UniqueName="CheckBoxTemplateColumn" EnableHeaderContextMenu="true" Visible="true">
                                        <ItemTemplate>
                                            <telerik:RadCheckBox ID="Chk2" runat="server" OnClick="rbWPFileName_OnCheckedChanged" AutoPostBack="true" />
                                        </ItemTemplate>
                                         
                                    </telerik:GridTemplateColumn>
                                </Columns>
                            <%--<Columns>
                                    <telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="Date" UniqueName="Date" DataType="System.DateTime" SortExpression="Date" DataFormatString="{0:MM//dd/yy}"></telerik:GridDateTimeColumn>
                                </Columns>--%>
                            </MasterTableView>
                            <ClientSettings>
                                <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true" />
                                 
                            </ClientSettings>
                        </telerik:RadGrid>

 

2 Answers, 1 is accepted

Sort by
0
Percival
Top achievements
Rank 1
answered on 24 May 2017, 12:33 AM
Hi attached is the screenshot of the Excel-like filter
0
Vessy
Telerik team
answered on 29 May 2017, 10:07 AM
H Percival,

RadGrid does not provide a direct property to control the visibility of a column in its header context menu, but you can see a possible approach to achieve the same here:
http://www.telerik.com/forums/hide-columns-in-header-context-menu-for-column#hW0UGlvC00uw2RPTHW7cfg

You can also find useful information on how to customzie the items in the HeaderContextMenu of the grid in the following help article:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/columns/header-context-menu#add-items-to-headercontextmenu-in-order-to-set-dataformatstring-for-the-columns 

Regards,
Vessy
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Percival
Top achievements
Rank 1
Answers by
Percival
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or