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

HeaderContextFilterMenu For GridCheckBoxColumn

6 Answers 292 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ATeam
Top achievements
Rank 1
ATeam asked on 17 Jun 2010, 02:50 PM
Hallo!
We have a RadGrid which displays several columns of type checkbox, bound and template columns. The header filter context menu displays two checkboxes which are present in the filter template for the checkbox column also for the columns which are not a checkbox column. (See attchment). Another problem with the header filter context menu is that for a checkbox column, the first condition filter checkbox is disabled und cannot be used as a filter. The second condition is not necessary for a checkbox column but is the only one which can be used. How can this be changed?
Solutions I am looking for:
1. Checkboxes in the filter context menu for non checkbox columns should not be shown.
2. There should be only one checkbox in the filter contet menu for a checkbox column.
warm regards

6 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 23 Jun 2010, 11:10 AM
Hello Dominik Fürst,

I am going straight on to your questions:

  1. I tried to reproduce the described issue using this online demo of the product, but without success. Based on that, I would suggest that you open a formal support ticket and send me a small sample project which demonstrates the erroneous behavior. This way I would be able to debug it locally and provide more to the point resolution.
  2. In addition to the fact that you can filter a column by two conditions related with a logical "AND" operator, there is another reason for rendering two filtering controls in the filter context menu for each column. Here is short quote from our documentation that describes it:

    "The new filter menu can be used along-side the classic one. In this case, the GridTableView.IsFilterItemExpanded property should be set to true (the default value). When the two filter menus are switched on simultaneously, the data set for the first filter condition of the header context filter menu will be also set as filter data for the classic one and vice versa."

As stated above, the first filtering control from the header context filter menu works in conjunction with the default filter menu of the GridFilteringItem, while the second one does not support this functionality. That is why all columns provide two filtering controls in their heather context filter menus, although for some of the columns the second control might look unnecessary.

Regards,
Martin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
ATeam
Top achievements
Rank 1
answered on 23 Jun 2010, 12:13 PM
Hallo Martin,
Thanks for your reply. In this post I am ONLY speaking of the HeaderFilterContextMenu which I refer to as 'filter'

1. Ofcourse you would not be able it reproduce it in your demo as you have no check box column. It can be reproduced with a check box column AND (my latest discovery) if one views in the Internet Explorer is not in the Compatibility View mode. However there are still two check boxes in the filter (see screen shot). Actually theses check boxes should not appear in the filter for the columns which are not a check box column exactly like the text boxes don't appear in the filter for the check box column. This just confuses our users.

2. If I understood you right, your filtering control logic MUST have two filter conditions even if a check box column is to be filtered. However the first check box cannot be checked, only the second. This again leads to confusions as most first users give up trying the second one. I have posted a code block so you can see what settings we have used.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowFilteringByColumn="True" 
            AllowSorting="True" OnItemDataBound="RadGrid1_ItemDataBound" AutoGenerateColumns="False" 
            DataSourceID="oaRounddata" GridLines="None" EnableHeaderContextMenu="True" 
            EnableHeaderContextFilterMenu="True" ClientSettings-Resizing-AllowColumnResize="true" 
            OnItemCreated="RadGrid1_ItemCreated" ShowStatusBar="True" ShowGroupPanel="True"
<MasterTableView DataKeyNames="castingRounddata.Id" DataSourceID="oaRounddata" 
                RetrieveDataTypeFromFirstItem="true" IsFilterItemExpanded="false"
<Columns> 
... 
<telerik:GridBoundColumn HeaderStyle-Width="75px" AllowSorting="true" DataField="Firstname" 
                        HeaderText="Vorname" UniqueName="CandidateFirstname" SortExpression="Firstname"
                    </telerik:GridBoundColumn> 
... 
   <telerik:GridCheckBoxColumn DataField="Nein" HeaderText="Nein" SortExpression="Nein" 
                        AllowSorting="true" UniqueName="Nein"
                        <HeaderStyle Width="45px" /> 
                        <ItemStyle Width="45px" /> 
                    </telerik:GridCheckBoxColumn> 
... 


We are having problems because of the usability of the filter for the check box columns and we have about 10 of them and wanted to use Telerik RadGrid EXCULSIVELY BECAUSE of the two conditions for the other columns. It would be greatly appreciated if you could help us here.
Regards
Dominik Fürst
0
Martin
Telerik team
answered on 23 Jun 2010, 01:10 PM
Hello Dominik Fürst,

Thank you for the sample code. Based on it I performed some additional testing and was able to reproduce the issue after I added a RadFormDecorator on the page.

I have attached a small sample website containing two pages - one running correctly and one having the issue you have encountered. Note that in order to workaround the problem you need to declare a decoration zone for the RadFormDecorator and ensure that the grid is outside of this zone (check the Correct.aspx page).

And one side note - I noticed that you set HeaderStyle-Width as well as ItemStyle-Width to your check box column. Note that setting the HeaderStyle-Width should size the column to the desired width and therefore adding the ItemStyle-Width is not necessary.

I hope this helps,
Martin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
ATeam
Top achievements
Rank 1
answered on 23 Jun 2010, 03:04 PM
Dear Martin,
Thank you very much!! That fixed it!! I would have never come up with the idea to look for the solution in RadFormDecorator!!
Thankx again!
Regards
Dominik
0
Jean-Yves
Top achievements
Rank 1
answered on 21 Feb 2011, 07:18 PM
Hi, 

I just have a quesiton on this...
So, it's not possible to put a "telerik:RadFormDecorator" on the masterpage?

Thank you
0
Georgi Tunev
Telerik team
answered on 24 Feb 2011, 12:39 PM
Hi Jean-Yves,

Yes, you can use RadFormDecorator in the masterpage. If you are using a recent version of the control, this should not be a problem anymore, but in case you are using an old one, as a workaround you could get a reference to the RadFormDecorator (on the MastePage) from the content page, and dynamically set its DecorationZoneID property.
If you experience problems, please open a support ticket and send us a sample project that isolates your case so we can provide you with the most appropriate solution.

Best wishes,
Georgi Tunev
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
Tags
Grid
Asked by
ATeam
Top achievements
Rank 1
Answers by
Martin
Telerik team
ATeam
Top achievements
Rank 1
Jean-Yves
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or