Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top