Lightswitch网格的多个复选框选择 [英] Multiple Check Box Selection for Lightswitch Grid

查看:76
本文介绍了Lightswitch网格的多个复选框选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了Yann在Lightswitch中关于多行选择的非常好的文章,内容如下:

I have read Yann's very good article on multiple row selection in Lightswitch, as follows:

如何在LightSwitch的网格中启用多行选择

但是,我们的客户需要一个实际的复选框来选择数据网格中的多行.不涉及或不需要层次结构(例如,多对多复选框扩展).

However, our customers require an actual check box to select multiple rows in a data grid. No hierarchy is involved or required (e.g. Many To Many CheckBox extension).

我们无法更改表,因为仅需要选择复选框多行即可选择特定Web会话的项目,并且系统上的许多用户可以拥有自己的会话,并且每个会话之间不得有冲突从数据 表透视图.

We cannot change the table, as the checkbox multiple row selection is only required to select items for a particular web session, and many users on the system can have their own session, and there must be no conflict between each of the sessions from a data table perspective.

任何人都可以提供指导,说明如何使用lightswitch为表格中不需要表格中布尔值字段的多行创建一个简单的复选框,以便可以对那些选定的行执行处理吗?

Can anyone provide guidance on how to create just a simple checkbox for multiple rows in a grid that does not require a boolean field in the table using lightswitch, so processing can be performed for those selected rows?

谢谢.

推荐答案

首先,Yann解决方案是最干净,最好的解决方案...

First of all Yann solutions is the clean and the best...

但是,如果您必须有一个复选框,那么我将添加一个带有bool字段和用户名的新表(TempCheck).与此新表0或1 TO 1建立关系.

BUT if you have to have a checkbox then I would add a new table (TempCheck) with the bool field and a username. Create a relationship to this new table 0 or 1 TO 1.

然后,当您调用屏幕时,循环所有记录,并添加新的TempCheck记录并填写用户名.现在,您可以选中该复选框.

Then when you call the screen loop all your records and add a new record of TempCheck and fill in the username. Now you can select the checkbox.

-您必须更改记录查询以添加一个过滤器,其中TempCheck.Username = currentuser.

- you have to change the query of the records to add a filter where TempCheck.Username= currentuser.

-关闭屏幕时,删除所有添加的TempCheck.

- When you close the screen delete all the TempChecks that you added.

我从没尝试过,但我认为它会起作用:)

I never tried it but I think it would work :)


这篇关于Lightswitch网格的多个复选框选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆