Skip to Content
0

Unable to use Searchfield in TreeTable for my application

Feb 07, 2017 at 11:17 AM

29

avatar image
Former Member

Hi,

I am trying to utilize the searchField feature in treeTable. When I am trying like code given below :-

var sValue = evt.getParameter("value");
var oFilter = new sap.ui.model.Filter( "Node", sap.ui.model.FilterOperator.Contains, sValue );
var treeTableID = sap.ui.getCore().byId("treeTable"); treeTableID.getBinding("items").filter([oFilter]);

Here treeTable is the id of my treetable in the xml.

XML code of my treeTable is

<table:TreeTable id="treeTable" expandToLevel="4" selectionMode="Single" selectionBehavior="RowOnly" rowSelectionChange="selectionChangeDGHierarchy" expandFirstLevel="true" rows="{ path : '/', parameters: {arrayNames:['Children']} }">

<table:columns> <table:Column label="Hierarchy"> <table:template> <Text text="{Node}"/> </table:template> </table:Column>

<table:Column label="Description"> <table:template> <Text text="{Text}"/> </table:template> </table:Column> </table:columns>

</table:TreeTable>

Please help me.

Thanks in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers