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. Image for the cookie policy date
close icon

Hide expansion indicator for rows with no children

Is it possible to hide the default expansion indicator on Treegrid rows that have no children?

Regards,

Martin

4 Replies

MC Martin Cully May 3, 2016 01:09 PM UTC

I've tried to handle this in the queryCellInfo and it seems to work for the first page when paging is on but not on subsequent pages. Looks to me like the queryCellInfo event is not fired when going to next page.

Here's my code - I think it's too wide a scope on the css selector but I can get more specific once the event fires when going page to page:

function queryCellInfo(args) {
    if (args.data.hasChildRecords === false) {
        $(".e-treegridexpand").css({ "display": "none" });
        $(".e-treegridcollapse").css({ "display": "none" });
    }
}



JS Jonesherine Stephen Syncfusion Team May 4, 2016 10:55 AM UTC

Hi Martin, 
Query 1: Is it possible to hide the default expansion indicator on Treegrid rows that have no children? 
Solution:  Only the Parent records having expander/collapse icon in Treegrid. These icons were absent in the tasks with no children.so could you please share more details related to this query with us and it will be very helpful for us to understand your requirement clearly and update the response?  
   
Query 2: I've tried to handle this in the queryCellInfo and it seems to work for the first page when paging is on but not on subsequent pages. Looks to me like the queryCellInfo event is not fired when going to next page. 
Solution: We were able to reproduce the issue in queryCellInfo trigger while selecting the subsequent pages in Paging and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue. 
Please log on to our support website to check for further updates. 
 
Please let us know if you require further assistance on this.
Regards,
Jone Sherine .P.S.
 



MC Martin Cully May 4, 2016 11:30 AM UTC

With regards to query 1, this JSFiddle shows the issue. For the first row "No Children", the subtasks array is empty but the row is rendered with an expansion indicator.

https://jsfiddle.net/ptmyek7b/

Regards,

Martin


JS Jonesherine Stephen Syncfusion Team May 4, 2016 12:52 PM UTC

Hi Martin, 
We regret about the inconvenience caused. 
We were able to reproduce the issue regarding the visibility of expander/collapse icon on parent record with no children and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue. 
Please log on to our support website to check for further updates. 
Please let us know if you require further assistance on this.

Regards,
Jone Sherine .P.S.
 


Loader.
Live Chat Icon For mobile
Up arrow icon