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.
Unfortunately, activation email could not send to your email. Please try again.

Expand/collapse nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

123171 Feb 23,2016 07:24 AM Feb 24,2016 08:28 AM ASP.NET Web Forms 1
loading
Tags: TreeGrid
Jorge Pampin
Asked On February 23, 2016 07:24 AM

Hello,

In this sample http://asp.syncfusion.com/demos/web/treegrid/columntemplate.aspx, how to show the icons to expand/collapse the nodes?

Thanks!

Mahalakshmi Karthikeyan [Syncfusion]
Replied On February 24, 2016 08:28 AM

Hi Jorge,

We can render the Expand/ Collapse icons as like in the normal TreeGrid samples by removing all the styles in the sample and include “e-icon” this class with the e-treegridexpand and e-treegridcollapse. Please refer the below code example for details.

<script type="text/x-jsrender" id="customColumnTemplate">     
        //…

      <div class='{{if expanded}}e-treegridexpand e-icon  {{else hasChildRecords}}e-  

           treegridcollapse e-icon {{/if}}' style='height:20px;width:30px;margin:auto;float:left;margin-left:10px;'

       unselectable='on'></div>

      </div>

</script>

We have also prepared a sample based on this and you can find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/ColumnTemplate132455021

Regards,

Mahalakshmi K.


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.

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.

;