Telerik RadSpell 在 RadComboBox 上不起作用?
我有一个 RadComboBox,AllowCustomText 属性设置为 true,我需要为用户提供拼写检查输入的功能。我通过简单地添加 RadSpell 控件来完成此操作,如下所示:
<telerik:RadComboBox
ID="rcbsScopeOfWorkGroupDescription"
runat="server"
AppendDataBoundItems="true"
AllowCustomText="true"
DataSourceID="odsScopeOfWorkGroupDescription"
DataTextField="sScopeOfWorkGroupDescription"
DataValueField="sScopeOfWorkGroupDescription"
Text='<%# Bind("sScopeOfWorkGroupDescription") %>'>
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<telerik:RadSpell
ID="rssScopeOfWorkGroupDescription"
runat="server"
ControlToCheck="rcbsScopeOfWorkGroupDescription"
IsClientID="false"
DictionaryLanguage="en-AU"
DictionaryPath="~/App_Data/RadSpell" />
此弹出窗口可以正确找到所有拼写错误,但单击“更改”不会更新 RadComboBox 的值。奇怪的是,如果我单击“更改”,关闭拼写检查器,然后重新运行拼写检查,它会说找不到任何错误。显然,RadSpell 控件正在更新某些字段,但不是用于显示或保存数据的字段。
任何提示将不胜感激!
I have a RadComboBox with the AllowCustomText property set to true, and I need to provide users with the facility to spell check their entry. I've done this by simply adding a RadSpell control as follows:
<telerik:RadComboBox
ID="rcbsScopeOfWorkGroupDescription"
runat="server"
AppendDataBoundItems="true"
AllowCustomText="true"
DataSourceID="odsScopeOfWorkGroupDescription"
DataTextField="sScopeOfWorkGroupDescription"
DataValueField="sScopeOfWorkGroupDescription"
Text='<%# Bind("sScopeOfWorkGroupDescription") %>'>
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<telerik:RadSpell
ID="rssScopeOfWorkGroupDescription"
runat="server"
ControlToCheck="rcbsScopeOfWorkGroupDescription"
IsClientID="false"
DictionaryLanguage="en-AU"
DictionaryPath="~/App_Data/RadSpell" />
This popup correctly finds all spelling errors, but clicking Change does not update the RadComboBox's value. The strange thing is, if I do click on change, close the spell checker, and then re-run the spell check it says that it can't find any errors. Obviously the RadSpell control is updating some field, but not the one that is used for the display or for the saving of the data.
Any tips would be greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 RadSpell 和其他 Telerik 控件的兼容性问题,应该在下一个 RadControls 版本中解决。组合框值存储在隐藏输入中,这是您目前需要检查的内容。例如,通过设置
RadSpell 控件,您将检查组合框的隐藏输入。请注意,如果您使用母版页或用户控件,则 ControlToCheck 的值可能会有所不同。在这种情况下,您可以尝试从代码隐藏文件中设置它:
这样它应该始终找到正确的 ID。
This is a compatibility problem with the RadSpell and other Telerik controls, that should be addressed in the next RadControls release. The combobox value is stored in a hidden input, which is what you will need to check at the moment. For example, by setting
for the RadSpell control, you will check the combobox's hidden input. Note that the value of the ControlToCheck might be different if you are using a master page or user controls. In this case, you can try setting it from the code behind file:
This way it should always find the correct ID.