Configfile.xml ignored

3 posts, 0 answers
  1. Application Support
    Application Support avatar
    5 posts
    Member since:
    Mar 2009

    Posted 10 Jul 2009 Link to this post

    I have a website where the Spellchecker uses the PhoneticProvider even though we are trying to use the EditDstanceProvider.
    We are running on RadEditer version 7.3.5 and RadSpell version  3.2.7

    The ConfigFle.xml  located at Webroot/Radcontrols/Editor contains the following:
    ......
    <property name="RadSpellTypeName">Telerik.WebControls.RadSpell, RadSpell.Net2</property>
    ......
     <!-- RadSpell properties -->
     <property name="SpellAllowAddCustom">true</property>
      <property name="SpellCheckProvider">EditDistanceProvider</property>
      <property name="SpellCustomDictionarySourceTypeName"></property>
      <property name="SpellCustomDictionarySuffix">-custom</property>
      <property name="SpellDictionaryPath"></property>
      <property name="SpellDictionaryLanguage"></property>
     <property name="SpellEditDistance">1</property>
     <property name="SpellFragmentIgnoreOptions">None</property>
     <property name="SpellWordIgnoreOptions">RepeatedWords</property>
     <!-- /RadSpell properties -->
    ......
    We placed these three test pages in the webroot:
    Spelltest.aspx

    <%@ Page Language="C#" MasterPageFile="MasterPages/CambridgeshireRight.master" Title="Register for Cambridgeshire.net" %>
    <%@ Register Assembly="CCCDIT.InfoCam.Controls" Namespace="CCCDIT.InfoCam.Controls.UI"    TagPrefix="cc1" %>
    <%@ Register Assembly="RadSpell.NET2" Namespace="Telerik.WebControls"    TagPrefix="cc2" %>
    <%@ Register Assembly="RadEditor.Net2" Namespace="Telerik.WebControls"    TagPrefix="cc3" %>

    <asp:Content ID="Content2" ContentPlaceHolderID="MainArea" Runat="Server">
      <div class="content">
       <asp:TextBox ID="gf" runat="server" TextMode="MultiLine" Width="100%" Height="200px" Text="arange arrrange"></asp:TextBox>
         <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" />
      </div>
    </asp:Content>

    SpelltestPhonetic.aspx
    as above except
         <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" SpellCheckProvider="PhoneticProvider" />

    SpelltestDistance.aspx

    as above except
         <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" SpellCheckProvider="EditDistanceProvider" EditDistance="1" />

    SpellTest and SpellTestPhonetic identify both arange and arrrange a being misspelled with suggestions given of:
      arange    -    orange    arrange    oranges    arranged    arranger    arranges 
      arrrange    -    no suggestions

    SpellTestDistance again shows both arange and arrange as misspelled with suggestions:
       arange    -    range    grange    orange    arrange
      arrrange    -    arrange

    Utilising the online test at http://demos.telerik.com/aspnet-ajax/spell/examples/whatsnew/defaultcs.aspx
      With EditDistanceProvider selected the results match SpellTestDistance.aspx
      With PhoneticProvider selected the results match both SpellTest.aspx and SpellTestPhonetic.aspx

    The spellchecker on this text boc matches the behaviour of the PhoneticProvder.  

    To me this shows the default behaviour being used by my site is the PhoneticProvider even though we have specified the EditDistanceProvider in the ConfigFile.xml.

    Can anyone spot what is wrong or do I need to do something else?
  2. Application Support
    Application Support avatar
    5 posts
    Member since:
    Mar 2009

    Posted 14 Jul 2009 Link to this post

    Other posts in the forum indicate that RadEditor is not configured to use its ConfigFile.xml file, by default and needs to be configured to do so using:

    <radE:RadEditor id="RadEditor1" ConfigFile="~/RadControls/Editor/ConfigFile.xml" runat="server"></radE:RadEditor>

    Unfortunately I have been unable to identify where, what file, this additional configuration needs to be added.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 15 Jul 2009 Link to this post

    Hi Neil,

    The ConfigFile.xml is a functionality of RadEditor. It has nothing to do with RadSpell, and cannot be used to configure a stand-alone RadSpell control.

    What probably got you confused is that RadEditor does use an integrated RadSpell control to provide spellcheking functionality - hence it does expose a number of spell-related properties.

    So, to configure a RadSpell you need to simply set its properties - just like with any other ASP.NET control. You have already done that in your tests:
            <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" SpellCheckProvider="EditDistanceProvider" EditDistance="1" />

    Alternatively, you can use the ASP.NET Themes mechanism and .skin files in the App_Themes folder to configure multiple instances of RadSpell. Theming functionality is general ASP.NET functionality that is not specific to RadControls and there is plenty of information online how to utilize it.

    Best regards,
    Tervel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top