cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use Searchfield in TreeTable for my application

Vinay07
Explorer
0 Kudos

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.

Accepted Solutions (0)

Answers (0)