C1Gridview collapse grouped row

Posted by: kaytea on 10 September 2017, 11:34 am EST

  • Posted 10 September 2017, 11:34 am EST

    The following is my code for the gridview. 

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <cc2:C1GridView ID="C1GridView1" runat="server" AutoGenerateColumns="False" CellPadding="5"
    AllowPaging="True" AllowSorting="True" GridLines="Both" Font-Names="Tahoma" Font-Size="Small"
    DataSourceID="UploadEventsDS" DataKeyNames="impEventID" AllowColMoving="True"
    AllowGrouping="True" AllowColSizing="True" ShowFilter="True" VisualStylePath="~/C1WebControls/VisualStyles">
    <cc2:C1TemplateField SortExpression="approved" HeaderText="Approve">
    <asp:ImageButton ID="ApproveBtn" runat="server" ImageUrl="~/img/Check-icon.png" AlternateText="Approve"
    ToolTip="Approve" CommandName="Approve" CommandArgument='<%#Eval("impEventID") %>'
    Visible='<%# IIF(Eval("approved") = True, "False", "True") %>' OnClientClick="return confirm('Are you sure you want to approve this upload?')">
    <cc2:C1TemplateField SortExpression="fileName" HeaderText="File Name">
    <asp:LinkButton ID="GetFileLink" runat="server" CommandName="GetFile" CommandArgument='<%#Eval("impEventID") %>'
    Text='<%#Eval("fileName") %>'></asp:LinkButton>
    <cc2:C1BoundField DataField="orgName" HeaderText="Organization Name" SortExpression="orgName" />
    <cc2:C1BoundField DataField="projName" HeaderText="Project Name" SortExpression="projName" />
    <cc2:C1BoundField DataField="divName" HeaderText="Sub-project Name" SortExpression="divName" />
    <cc2:C1BoundField DataField="dataTypeName" HeaderText="Data Type" SortExpression="dataTypeName" />
    <cc2:C1BoundField DataField="uploadDescription" HeaderText="Uploaded Description"
    SortExpression="uploadDescription" />
    <cc2:C1BoundField DataField="uploadAcct" HeaderText="Uploaded By" SortExpression="uploadAcct" />
    <cc2:C1BoundField DataField="uploadDT" HeaderText="Uploaded Date/Time" SortExpression="uploadDT" ShowFilter="False" />
    <cc2:C1BoundField DataField="importAcct" HeaderText="Approved By" SortExpression="importAcct" />
    <cc2:C1BoundField DataField="importDT" HeaderText="Approved Date/Time" SortExpression="importDT" ShowFilter="False" />
    No upload events found.
    Mode="NextPreviousFirstLast" NextPageImageUrl="~/img/page-next.gif" PreviousPageImageUrl="~/img/page-prev.gif" />
    <p>I cannot collapse the grouped row by hitting the [-].  I am using IE 8.0.6001.18943.  It does not collapse in FF 3.6 as well.  Version of C1 is 4.0.20102.188

  • Replied 10 September 2017, 11:34 am EST


    checked your sample on my side with your version of the control, everything works fine both under IE and FF.

    Could you provide a description of your actions step-by-step? Maybe there is some additional relevant code?



  • Replied 10 September 2017, 11:34 am EST

    Let's use a simpler grid.

               <cc2:C1GridView ID="C1GridView1" runat="server" AllowColMoving="True"

                   AllowGrouping="True" AllowPaging="True" AllowSorting="True"

                   AutoGenerateColumns="False" DataSourceID="ProjectsEntities"

                   UseEmbeddedVisualStyles="True" VisualStyle='Vista'



                       <cc2:C1BoundField HeaderText="Organization" ShowFilter="False">


                       <cc2:C1BoundField HeaderText="Project Name" ShowFilter="False">




    1. Drag C1Gridview onto the aspx

    2. Go to Design mode, and choose Smart tag.

    3. Choose Vista skin.

    4. Choose datasource, and then go to properties builder

    5. General: Allow Sorting, Allow Grouping, Allow Col. Moving.

    6. Columns: Uncheck auto-gen columns at run time, add 2 bound Fields, set HeaderText, set DataField, and ShowFilter to False.

    7. Paging: Allow Paging to True.

    8. Close and Run.

  • Replied 10 September 2017, 11:34 am EST

    I checked the sample with ?1.Web.UI.Controls 4.0.20102.188, still don't see the issue, I drag "org" column to GroupArea, groups are expanded collapsed normally by clicking -+.

    As for "The grouped row text doesnt look like it's aligned with the [-] image.", try to add the following css to the page

               .C1GridView_Vista .C1GroupHeaderRow span


                   position: relative;

                   top: 2px;


  • Replied 10 September 2017, 11:34 am EST

    Well, we also tried it in a clean project and on a different dev. machine (win 7 instead of server 2008) with the same C1 installation.  We still see the same behaviors: cannot collapse and sort the grouped row/column.  What suggestions do you have?

  • Replied 10 September 2017, 11:34 am EST


    I tried this as well and everything seems to work fine on my end. I have attached my files for your reference if you want to try them out on your side.

    I hope this helps.




  • Replied 10 September 2017, 11:34 am EST

    Hi C1_Mateen,

    I ran your solution on my machine, I am able to collapse the grouped col.  I copied the grid code portion to my solution and ran on my machine, it didnt work. What can make it stop working??  The only difference is that your solution has a licenses.licx file that states the version of the C1Gridview (4.20102.188) which is not the same as mine (4.0.20101.73).  In fact, my solution doesnt even have a licenses.licx file.  Copied your licenses.licx over to my "Properties" folder, also didnt work.

  • Replied 10 September 2017, 11:34 am EST


    The version .73 you mention is for C1.Web.UI where as the .188 is the C1.Web.UI.Controls.4.

    Please make sure you have the C1.Web.UI.Controls.4 dll referenced in your project.

    If you continue to have a problem, please call our support line at 412-681-4738



  • Replied 10 September 2017, 11:34 am EST

    Here is the screenshot.

    The grouped row text doesnt look like it's aligned with the [-] image.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels