Hiding column bug when using Column groups

9 posts, 0 answers
  1. Lionel Najman
    Lionel Najman avatar
    5 posts
    Member since:
    Nov 2004

    Posted 11 Jun 2013 Link to this post

    Hi I'm using Telerik ASP .Net Ajax 2013.1 417 (latest stable version)

    I wand to trigger hide/show column with HeaderContextMenu and ColumnGroups

    Under some circonstances layout is messed up, changes are not applied correctly to the columns groups.

    Here is my sample:
    - When deselecting Appt column (column 3): the third column group (Action) is wrongly hidden (display:none is added)
    - When deselecting Nom 2 column (column 7) : the seond column group is not changed, resulting in a messed up display (its colspan shoud be lowered and it's not)

    Can you help me?
    <telerik:RadGrid   ID="RadGrid1"  OnItemCreated="RadGrid1_ItemCreated"  PageSize="2" AllowPaging="true" runat="server"  Skin="Default" Culture="fr-FR"   OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged"  DataSourceID="DataSource1" >
        <MasterTableView  runat="server"  AutoGenerateColumns="False"   CommandItemDisplay="None" EnableHeaderContextMenu="true">
         
         <CommandItemSettings  ShowExportToCsvButton="true" />
                <ColumnGroups>
                <telerik:GridColumnGroup  Name="Mandat" HeaderText="Mandat"  HeaderStyle-CssClass="GroupingHeaderTitle" />
              
                        <telerik:GridColumnGroup Name="Candidat" HeaderText="Candidat"   HeaderStyle-CssClass="GroupingHeaderTitle"/>
                        <telerik:GridColumnGroup Name="Action" HeaderText="Action" HeaderStyle-CssClass="GroupingHeaderTitle" />
                         
                </ColumnGroups>
                <Columns>
                   <telerik:GridTemplateColumn Groupable="false" HeaderText="N°" ColumnGroupName="Mandat">
                     
                        <ItemTemplate><asp:Label ID="LblNumeroMandant" Text='<%# Eval("TmpUnite_NoMdt") %>' runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Nom" ColumnGroupName="Mandat">
                        <ItemTemplate><asp:Label ID="LblNomMandant" Text='<%#Eval("TmpUnite_LbMnd") %>' runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Appt" ColumnGroupName="Mandat">
                        <ItemTemplate><asp:Label ID="LblAppt" Text='<%# Eval("TmpUnite_NoApp") %>' runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Nature" ColumnGroupName="Mandat">
                        <ItemTemplate><asp:Label ID="LblNature" Text='<%#Eval("TmpUnite_LbApp") %>' runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Vacant" ColumnGroupName="Mandat">
                        <ItemTemplate><asp:Label ID="LblVacant" Text='<%#Eval("TmpUnite_DtVac") %>' runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="N°" ColumnGroupName="Candidat">
                        <ItemTemplate><asp:Label ID="Lbl" Text='<%# Eval("TmpCandloc_NoMdt") %>' runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Nom 2" ColumnGroupName="Candidat">
                        <ItemTemplate><asp:Label ID="LblNomCandidat" Text='<%# Eval("TmpCandloc_LbClo") %>' runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Annulation" ColumnGroupName="Candidat">
                        <ItemTemplate><asp:Label ID="LblAnnulation" Text="" runat="server" /></ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn Groupable="false" HeaderText="Action" HeaderStyle-HorizontalAlign="Center"  ColumnGroupName="Action">
                        <ItemTemplate>
                            <center>
                            <asp:ImageButton ID="IBConsultation" SkinID="Consultation" runat="server" />  
                            <asp:ImageButton ID="IBModification" SkinID="Modification" runat="server" />  
                            <asp:ImageButton ID="IBSuppression" SkinID="Suppression" runat="server" />  
                            <asp:ImageButton ID="IBValidation" SkinID="Validation" runat="server" />
                            </center>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                     
                </Columns>
                 
                <PagerStyle AlwaysVisible="true" Mode="NextPrevNumericAndAdvanced"  PageSizes="10,30,60" />
            </MasterTableView>
            <ClientSettings AllowColumnsReorder="True"  EnablePostBackOnRowClick="true"  EnableRowHoverStyle="true">
                <Resizing AllowColumnResize="true"  ClipCellContentOnResize="false" EnableRealTimeResize="true"  />
                <Selecting AllowRowSelect="true"/>
            </ClientSettings>
        </telerik:RadGrid>
    (maybe as a correction in the future Q2 2013)
  2. Lionel Najman
    Lionel Najman avatar
    5 posts
    Member since:
    Nov 2004

    Posted 12 Jun 2013 Link to this post

    Hi,

    I've tried latest Q2 2013: the behaviour is worse:now when columns groups are enabled, hiding a column only hide data rows, column group colspan is not affected and the hidden column header is not hidden anymore.

    Thanks for your help
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 14 Jun 2013 Link to this post

    Hello Lionel,

    This is a known issue to us and is already logged into our system. Our developers are currently researching the matter and will provided a fix as soon as possible. For now you can workaround the problem by enabling the static headers functionality of the grid. In attachments you can find a sample website which uses the code provided and integrates this approach.

    Please accept our apologies for the inconvenience this may have caused you.

    Regards,
    Angel Petrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  5. Chris
    Chris avatar
    12 posts
    Member since:
    Aug 2012

    Posted 30 Jul 2013 Link to this post

    I'm currently experiencing this issue as well with version 2013.2.611.35

    Is there any known workaround? I've noticed that the column group headers seem to lose their Name attribute, which is probably the root of the problem.

    Is there any way I could perhaps insert a user defined attribute into the column group so I can at least reliably access the header object? If I can at least grab that, I can redefine the colspan appropriately.
  6. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 02 Aug 2013 Link to this post

    Hello Chris,

    As my colleague Angle previously mentioned possible workaround is to enable the static headers for the RadGrid control. Give this a try and let me know if it help.

    Regards,
    Maria Ilieva
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  7. Curtis
    Curtis avatar
    23 posts
    Member since:
    Jan 2008

    Posted 02 Sep 2013 Link to this post

    We are also experiencing this issue and enabling static headers did not fix the issue for us nor is that a workable solution for our end-users if it did work.

    When is this expected to be fixed?

    Thanks,
    Curtis
  8. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 04 Sep 2013 Link to this post

    Hello Curtis,

    In case enabling the Static Headers does not fix the issue I would suppose that the problem could be related with your scenario and is not  exactly the known issue discussed in this thread. Therefore it will be bets if you cold open a separate support ticket and elaborate a bit more on your scenario. Thus we will be able to further investigate the problem and do our bets to provide proper solution.

    Regards,
    Maria Ilieva
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  9. Matthew Botting
    Matthew Botting avatar
    41 posts
    Member since:
    Apr 2005

    Posted 16 Jun 2014 Link to this post

    I have a similar issue where in code I am dynamically setting columns to be visible = false
    This completely messes with the layout of the columngroups,
    I have tried setting display = false instead but it does not work.

    The static headers does not fix this issue.

    What I really need to be able to do is to modify the colspan of the ColumnGroup but it is read only.

    Any ideas?
  10. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 19 Jun 2014 Link to this post

    Hi Matthew,

    It appears that you are facing specific issue that might be caused by various circumstances.
    Therefore in order to be able to provides the best solution for you specific case I would suggest you to open a separate support ticket and provide detailed description for your scenario and the exact issue you are facing.

    Thus we will be able to insect it locally and advise you further.

    Regards,
    Maria Ilieva
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017