How to remove groups

Originally Posted 12 December 2007, 1:15 am EST

  • Originally Posted 12 December 2007, 1:15 am EST

    I'am using Outlook-style grouping of rows.  How to remove groups on Client-side. 
  • Reply

    Hello,


    You can use the CallBack method of Spread with the Command set to Ungroup, n, m (where n is the column to ungroup and m is the column you want to place this grouped column). Or, if you need to do a full postback of the page, you can do the same command using the __doPostBack function.


       FpSpread1.CallBack("Ungroup, 2, 2");
    or
       __doPostBack("FpSpread1", "Ungroup,2,2");

  • Reply

    Thanks, but ...



    1. To begin a new group  I double-click a column header, how to remove group from groupimg bar?

    2. In a groupimg bar I see the column name but I need to see the column header label. 


     

  • Reply

    Hello,


    1) There is not a way client side to know what column(s) have been grouped. You can use the Grouped event to get the column(s) being grouped and store off the column number in a hidden field or attribute that you can query client side. Then, you can use code like I gave you in the last post to ungroup that column.


    2) If the Spread control is bound, then the name of the bound DataColumn will display in the GroupBar. If you are not bound, we do not have a way to get at the data for the header in the GroupDataModel (model used for displaying the grouped data) so you will just get the default labels for the SheetView.

  • Reply

    Hi:


    How to add new group on Server-side to restore a last state of page ?


     

  • Reply

    Hello,


    If you want to implement grouping of the Spread server side, you would need to get the DataModel from the Spread as a GroupDataModel object and then call the Group method with the columns you want grouped and what sort state you want them in.

     
        <SPAN class=kwd>Dim</SPAN> gm <SPAN class=kwd>As New</SPAN> FarPoint.Web.Spread.Model.GroupDataModel(FpSpread1.Sheets(0).DataModel)
    <SPAN class=kwd>Dim</SPAN> si() <SPAN class=kwd>As</SPAN> FarPoint.Web.Spread.SortInfo = <SPAN class=kwd>New</SPAN> FarPoint.Web.Spread.SortInfo() {<SPAN class=kwd>New</SPAN> FarPoint.Web.Spread.SortInfo(3, <SPAN class=kwd>True</SPAN>)}
    gm.Group(si)
    FpSpread1.Sheets(0).DataModel = gm
     
  • Reply

    Delete a group in Outlook
    Open Outlook for Windows.
    Under Groups on the left nav bar, select your group.
    Select Edit Group on the ribbon.
    Click the Delete Group button in the lower-left corner of the window.
    Select I understand that all group content will be deleted > Delete.

    Greetings,
    Peter
Need extra support?

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

Learn More

Forum Channels