tag:blogger.com,1999:blog-7392132758872548721.post7488450713747672234..comments2023-06-02T08:20:57.259-07:00Comments on Squaredi.com: Coding, Craftsmanship, and Technology: GroupingCollection2 not deleting an item while groupeddShefmanhttp://www.blogger.com/profile/13536061718008158529noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7392132758872548721.post-37526361228592337212014-12-05T06:51:30.635-08:002014-12-05T06:51:30.635-08:00Naveen, here is the class that I created:
public...Naveen, here is the class that I created: <br /><br />public class GroupingCollection_IHasExpandability extends GroupingCollection2<br /> {<br /> <br /> private var helper:Helper_IHasExpandability<br /> <br /> public function GroupingCollection_IHasExpandability()<br /> {<br /> super();<br /> helper = new Helper_IHasExpandability();<br /> }<br /><br /><br /><br /> public override function canHaveChildren(node:Object):Boolean<br /> {<br /> var rtn:Boolean = false; <br /> if (node is IHasExpandability)<br /> {<br /> rtn = helper.canHaveChildren(node);<br /> }<br /> else<br /> {<br /> rtn = super.canHaveChildren(node);<br /> }<br /> return rtn; <br /> }<br /><br /> public override function getChildren(node:Object):Object // NO PMD<br /> {<br /> super.getChildren(node); // call to super has to happen to setup the parent map, but don't use the results<br /> var rtn:Object // NO PMD<br /> if (node is IHasExpandability)<br /> {<br /> rtn = helper.getChildren(node)<br /> }<br /> else<br /> {<br /> rtn = super.getChildren(node);<br /> }<br /> /*<br /> Make sure this return value is not null. <br /> A null value will cause the HierarchicalCollectionView to RTE on its internal refresh method<br /> */<br /> if (rtn == null)<br /> {<br /> rtn = new Object();<br /> }<br /> return rtn;<br /> <br /> }<br /><br /> public override function hasChildren(node:Object):Boolean<br /> {<br /> var rtn:Boolean = false;<br /> if (node is IHasExpandability)<br /> {<br /> rtn = helper.hasChildren(node);<br /> }<br /> else<br /> {<br /> rtn = super.hasChildren(node);<br /> }<br /> return rtn;<br /> }<br /><br /> }dShefmanhttps://www.blogger.com/profile/13536061718008158529noreply@blogger.comtag:blogger.com,1999:blog-7392132758872548721.post-33083228634214574302014-12-05T02:05:23.548-08:002014-12-05T02:05:23.548-08:00Hi,
I am facing the same issue... Can you please e...Hi,<br />I am facing the same issue... Can you please explain how to fix this?Anonymoushttps://www.blogger.com/profile/10472980913678243539noreply@blogger.com