我可以检索已输入自动填充框的文本吗? [英] Can I retrieve text that has been typed into an autocomplete box?

查看:64
本文介绍了我可以检索已输入自动填充框的文本吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试简化将新项目添加到查找表的过程。我想允许用户在列表中没有的自动填充框中键入内容。在保存屏幕之前,我想检查他们输入的内容是否在
列表中,如果不是,请使用用户提供的值执行添加操作,然后继续保存屏幕。


这样的事情可能吗?从我从其他帖子获得的有用信息中,我已经找到了如何通过用户启动的操作和对话框将项添加到查找表中,但对于某些事情,如果我能自动处理它会更容易。 / p>

谢谢

解决方案

LightSwitch中的默认AutoCompleteBox不支持您的方案。  


但是,我认为您可以将SilverLight autoCompleteBox用作LS屏幕内的自定义控件,并通过编写一些额外的代码来实现此功能。


以下主题讨论类似的内容,但略有不同。  数据字段不会保留为关系,而只是用户输入的字符串/文本,而循环表只是一个保留现有值的表:(
不是必需的,但是只是为了帮助用户输入重复的值。)


http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/a79f3efe-0ec7-4735-937f-7be09531cd94


如果您使用的是真正的查找表,并在表之间添加关系,则需要做一些额外的工作。  在您的情况下,如果数据直接绑定到关系,则必须在用户更改自动完成
框时查找/创建查找项,而不是在保存更改时。  如果两个用户在保存时输入相同的值,则必须解决冲突。


 


I'm trying to simplify the process of adding new items to a lookup table. I would like to allow the user to type something into the autocomplete box that isn't in the list. Before the screen is saved, I want to check to see if what they entered is in the list, and if it is not, do the add operation with the user supplied value and then proceed with saving the screen.

Is something like this possible? From helpful info I've gotten from other posts, I've figured out how to add items to the lookup table through user initiated actions and dialog boxes, but for some things it would be a lot easier if I could handle it automatically.

Thanks

解决方案

The default AutoCompleteBox in the LightSwitch doesn't support your scenario.  

However, i think you may use the SilverLight autoCompleteBox as a custom control inside a LS screen and implement this function by writing some extra code.

The following thread talks about something similar here, but slightly different.  The data field is not preserved as a relationship, but just the string/text input by the user, and the loop-up table is only a table to keep existing values: (which is not essential, but is only to help user to type in a repeated value.)

http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/a79f3efe-0ec7-4735-937f-7be09531cd94

If you are using a true look-up table, and add a relationship between tables, you need do some extra work.  In your case, if you data bind to the relationship directly, you have to find/create the lookup item when the user changes in the auto-complete box, but not when saving the change.  You have to resolve conflicts if two users input the same value at saving time.

 


这篇关于我可以检索已输入自动填充框的文本吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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