Telerik RadSpell 在 RadComboBox 上不起作用?

发布于 2024-08-23 13:11:37 字数 1000 浏览 5 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一梦浮鱼 2024-08-30 13:11:37

这是 RadSpell 和其他 Telerik 控件的兼容性问题,应该在下一个 RadControls 版本中解决。组合框值存储在隐藏输入中,这是您目前需要检查的内容。例如,通过设置

 ControlToCheck="rcbsScopeOfWorkGroupDescription_Input" 
 IsClientID="true"

RadSpell 控件,您将检查组合框的隐藏输入。请注意,如果您使用母版页或用户控件,则 ControlToCheck 的值可能会有所不同。在这种情况下,您可以尝试从代码隐藏文件中设置它:

rssScopeOfWorkGroupDescription.ControlToCheck = rcbsScopeOfWorkGroupDescription.ClientID + "_Input";
rssScopeOfWorkGroupDescription.IsClientID = true;

这样它应该始终找到正确的 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

 ControlToCheck="rcbsScopeOfWorkGroupDescription_Input" 
 IsClientID="true"

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:

rssScopeOfWorkGroupDescription.ControlToCheck = rcbsScopeOfWorkGroupDescription.ClientID + "_Input";
rssScopeOfWorkGroupDescription.IsClientID = true;

This way it should always find the correct ID.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文