We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Help to group in TreeGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

127406 Nov 14,2016 03:13 PM UTC Nov 17,2016 10:37 AM UTC ASP.NET Web Forms 4
loading
Tags: TreeGrid
GUYOT
Asked On November 14, 2016 03:13 PM UTC

Hello,

I need to make groups in my treegrid but i didn't really understood how make it.
Here is my Treegrid

 <ej:TreeGrid ID="TreeGrid" runat="server"
        ChildMapping=""
        CssClass=""
        DataSourceCachingMode="None"
        DataSourceID="SqlDataSourceOrdinateurs"
        Locale="fr-FR"
        IdMapping=""
        ParentIdMapping=""
        AllowFiltering="True"
        AllowColumnResize="true">
        <Columns>
            <ej:TreeGridColumn Field="Client" FilterEditType="Dropdown" Width="120">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="Type" FilterEditType="Dropdown" Width="80">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="Etiquette" Width="80">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="Marque" Width="80" FilterEditType="Dropdown">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="PN" Width="80">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="SN" Width="80">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="Nom" Width="80">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="Affectation" Width="120">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="Stock" Width="50">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="DateDébut" Width="80" HeaderText="Entrée">
            </ej:TreeGridColumn>
            <ej:TreeGridColumn Field="DateFin" Width="80" HeaderText="Sortie">
            </ej:TreeGridColumn>
        </Columns>
    </ej:TreeGrid>

I need to Group by Client 1st and Type 2nd. 
Is it possible to display number of row for each grouping level ?

Thank you for help :)

Jonesherine Stephen [Syncfusion]
Replied On November 15, 2016 03:43 PM UTC

Hi Guyot, 
Thanks for contacting Syncfusion support. 
We have analyzed the provided code snippet. By using “idMapping” and “parentIdMapping” property we can achieve the hierarchy [parent-child] in TreeGrid. 
For parent records the “parentId” should be null. For child records we need to map the required parentRecord’s Id as its parentId to achieve the hierarchy. 
Please find the code example below: 
      <ej:TreeGrid ID="TreeGrid1" runat="server" 
                IdMapping="CatUniqueID" 
                ParentIdMapping="CatBranchID" 
                DataSourceID="SQL1">                 
            </ej:TreeGrid>         
      <asp:SqlDataSource runat="server" ID="SQL1" ConnectionString="DefaultConnection" 
            SelectCommand="SELECT * FROM treedatatable"></asp:SqlDataSource> 
    </form> 
We have also prepared the sample and rendered the Tree Grid with SQL database for your reference. 
Please find the sample from below location. 
Is this your requirement? If not could you please share more details regarding your requirement with us. It would be helpful for us to serve you better. 
 
Disclaimer: We have removed bin and obj folder in the given sample for some security reasons, we must include Syncfusion.EJ and Syncfusion.EJ.Web dlls to render the TreeGrid control which is available in Essential Studio installed location.   
Regards, 
Jone sherine P S 


GUYOT
Replied On November 16, 2016 10:45 AM UTC

Thank you for help but i don't understand what to do to make it works. May be my dat are not well designed.
Here's what I have and what i want :


Is it possible to make this with treegrid ?
What must be my treegrid parameters ?

Thank you very much

GUYOT
Replied On November 16, 2016 10:47 AM UTC

Thank you for help but i don't understand what to do to make it works. May be my dat are not well designed.
Here's what I have and what i want :


Is it possible to make this with treegrid ?
What must be my treegrid parameters ?

Thank you very much

Sorry image won't work, i uploaded it in attached zip

Attachment: Capture_cf688a.zip

Jonesherine Stephen [Syncfusion]
Replied On November 17, 2016 10:37 AM UTC

Hi Guyot, 
In TreeGrid we can achieve the hierarchy by following ways: 
1. For self-reference data source we can achieve the hierarchy by using “idMapping” and “parentIdMapping”. 
2. For hierarchical data we need to map “childMapping” to achieve this hierarchy. 
We have analyzed the attached screen shots. As this feature is not available TreeGrid, we will consider this a feature request 
Please refer the below link regarding Grouping property of Grid.  
Please refer the above sample and let us know if it conforms to your requirement. If our definition of this feature is different from your requirement, then let us know the specific details, so that we can work towards fulfilling your requirement. 
Regards, 
Jone sherine. P S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;