Skip to Content
avatar image
Former Member

Unable to use Searchfield in TreeTable for my application

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers