如何调用 DSOperationType.REMOVE 从下拉网格中删除选定的记录?
我正在尝试从下拉网格中删除选定的记录。
在尝试执行此操作时,到目前为止,我了解到,当在 ValuesManager
类上调用 fetchData()
方法时,会调用 DSOperationType.FETCH
。所以现在我想知道调用 DSOperationType.REMOVE 应该执行哪一行。
或者有更好的方法来完成这个任务吗?
I am trying to delete the selected record from the drop-down grid.
In trying to do this, I've so far learned that DSOperationType.FETCH
is called when the fetchData()
method is called on ValuesManager
class. So now I want to know what line should be executed for calling DSOperationType.REMOVE
.
Or is there a better way to accomplish this task?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仅当从列表网格或树形网格中删除数据/行时,才会调用 DSOperationType.REMOVE。可以通过调用 ListGrid.removeData(someData) 或 ListGrid.removeSelectedData() 在功能上触发它;
但是对于 ComboBox/SelectBox (DropDown) 类型的项目,没有从列表中删除数据的功能,因为它只能从数据列表中选择(同时将调用列表 FETCH 操作加载数据)。
您可以通过使用带有 listgrid 的 Combobox/SelectItem 来间接实现该功能 - (例如:http://www.smartclient.com/smartgwt/showcase/#dropdown_grid_combobox_category)。在列表网格中,您可以具有删除数据功能。另请检查可以使用combobx实现的其他类型的功能 http://www.smartclient.com/ smartgwt/showcase/#multi_select_combobox_category
DSOperationType.REMOVE will be called only when removing data/row from list grid or tree grid. It can be triggered functionally by calling ListGrid.removeData(someData) or ListGrid.removeSelectedData();
But for ComboBox/SelectBox (DropDown) type item there is no functionality to remove data from list as it can only be selected from a list of data (while loading data for list FETCH operation will be called).
You can implement the functionlity indirectly by using Combobox/SelectItem with listgrid - (ex:http://www.smartclient.com/smartgwt/showcase/#dropdown_grid_combobox_category). In listgrid you can have remove data functionality. Also check other types of functionality that can be implemented with combobx http://www.smartclient.com/smartgwt/showcase/#multi_select_combobox_category