搜索值可在表SAPUI5中编辑和保存值(Searching for value enable edit and save value in the table SAPUI5)

编程入门 行业动态 更新时间:2024-10-19 08:53:29
搜索值可在表SAPUI5中编辑和保存值(Searching for value enable edit and save value in the table SAPUI5)

您好,我已经实现了一个表,自动添加1到搜索的数量。 这是jsbin。 。 使用此线程实现了表

除了将数量加1之外,还有一种方式,表格的行为就像一个普通的搜索过滤器,将搜索结果绑定到项目。

例:

SNR QUA 123 1 124 0

如果我在搜索过滤器上搜索123,结果将绑定到表格的项目,并且+1将被添加到123的QUA。结果将会

SEARCH: 123 SNR QUA 123 2

如果单击搜索字段中的“X”按钮,将显示该表

SNR QUA 123 2 124 0

Hi I have implemented a table that automatically adds 1 to the quantity of the value searched. Here is the jsbin. . Implemented the table using this thread

Is there a way that aside from adding 1 to the quantity, the table will behave like a normal search filter that binds the result of the search to the items.

Example:

SNR QUA 123 1 124 0

If I search for 123 on the search filter, the result will bind to the items of the table and +1 will be added to the QUA of 123. Result will be

SEARCH: 123 SNR QUA 123 2

If I click the "X" button in the search field, the table will display

SNR QUA 123 2 124 0

最满意答案

您可以在填充filterValue时创建一个Filter,并通过绑定“items”过滤表。

var oFilter; if(filterValue){ oFilter = new sap.ui.model.Filter("Sernr", "EQ", filterValue); } oSerialTable.getBinding("items").filter(oFilter, sap.ui.model.FilterType.Application);

在这里检查Jsbin 。

You can create a Filter when the filterValue is filled and filter the table by the binding "items".

var oFilter; if(filterValue){ oFilter = new sap.ui.model.Filter("Sernr", "EQ", filterValue); } oSerialTable.getBinding("items").filter(oFilter, sap.ui.model.FilterType.Application);

Check the Jsbin here.

更多推荐

本文发布于:2023-08-07 06:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1463067.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可在   编辑   Searching   table   save

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!