|
Title: TreeGrid : appending a row doesn't correctly apply striping Post by: itay-g on June 23, 2014, 12:47:12 AM Hello.
I am appending (using the append method on the treegrid of course) a row to a treegrid with striped : true, but no matter how many rows I append non of them get the "alt" striped display, and all of them are added as the default row style. Is this intentional? Thank you. Title: Re: TreeGrid : appending a row doesn't correctly apply striping Post by: stworthy on June 23, 2014, 08:11:18 PM Please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.6-patch.zip
Title: Re: TreeGrid : appending a row doesn't correctly apply striping Post by: itay-g on July 06, 2014, 07:26:17 AM Hey,
I have tried applying the patch and it doesn't seem to work exactly. Only if I refresh the entire data of the grid and the render method is invoked for all the elements then the new style is applied. It seems when one row is being appended only that row and its children are sent to the render function and then only they are calculated for the coloring, which results in that the root rows never receive the "alt" look. Thanks again. Title: Re: TreeGrid : appending a row doesn't correctly apply striping Post by: itay-g on July 16, 2014, 11:04:10 PM Help?
Title: Re: TreeGrid : appending a row doesn't correctly apply striping Post by: stworthy on July 18, 2014, 01:45:30 AM Please refer to this example http://jsfiddle.net/5HUgU/. It works fine.
Make sure you have applied the newest patch file in your page. It can be downloaded from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.6-patch.zip Title: Re: TreeGrid : appending a row doesn't correctly apply striping Post by: itay-g on July 20, 2014, 01:00:32 AM Hello,
I don't really understand what happened but on the patch I downloaded at the time instead of this row (which exists on the patch now) : var index = (pnode ? pnode.children.length : $(target).treegrid('getRoots').length) - children.length; I have this row: var index = (pnode ? pnode.children.length - children.length : 0; Now that I have re-downloaded the patch it works fine. Thank you! |