Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Spell > Potential bug in radspell

Not answered Potential bug in radspell

Feed from this thread
  • Posted on Aug 24, 2011 (permalink)

    I have the following requirement:
    • Radspell control to spell check a textbox
    • Radspell supports English and French languages
    • When an English user views the page, the English language is preselected from the dropdown, French language is selected otherwise

    I got the above working. However, when a French users enters purely English text in the textbox and select English from the drop down, the control still do the spell checking as if French is selected. I am using version 2011.1.519.40 and asp.net 4.0.

    I noticed that the issue occurs when only if I set the DictionryLanguage property

    Here is the code I have used
    Public Class _Default
        Inherits System.Web.UI.Page
     
        Dim language As String
     
     
        Protected Sub RadSpell1_Init(sender As Object, e As EventArgs) Handles RadSpell1.Init
            RadSpell1.SupportedLanguages = New String() {"en-us", "English", "fr-fr", "French"}
     
            If language = "1" Then
                RadSpell1.DictionaryLanguage = "fr-fr"
            Else
                RadSpell1.DictionaryLanguage = "en-us"
     
            End If
     
        End Sub
     
        Private Sub Page_PreInit(sender As Object, e As System.EventArgs) Handles Me.PreInit
            If Request.QueryString.AllKeys.Contains("lang") Then
                language = Request.QueryString("lang").ToString
            End If
        End Sub
    End Class

    <%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
        CodeBehind="Default.aspx.vb" Inherits="TelerikRadSpellPOC._Default" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
        <h2>
            Welcome to ASP.NET!
        </h2>
        <div>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <telerik:RadSpell ID="RadSpell1" runat="server"  ControlToCheck="TextBox1"
                        />
     
        </div>
    </asp:Content>

    Please let me know if I missed anything

    Reply

  • Posted on Aug 24, 2011 (permalink)

    As a work a around I have done the following

    Private Sub RadSpell1_Init(sender As Object, e As System.EventArgs) Handles RadSpell1.Init
            If TLang = LanguageType.English Then
     
                RadSpell1.SupportedLanguages = New String() {"en-us", "English", "fr-fr", "French"}
               
            Else
     
                RadSpell1.SupportedLanguages = New String() {"fr-fr", "French", "en-us", "English"}
                
            End If
     
        End Sub

    Reply

  • Ahmed avatar

    Posted on Aug 27, 2011 (permalink)

    It would be nice from the Telerik staff to let me know if I have done something wrong. I am the same person who posted the issue and I am using my work account which has the subscription instead of my personal
    Thanks
    A.

    Reply

  • Rumen Rumen admin's avatar

    Posted on Aug 30, 2011 (permalink)

    Hello Ahmed,

    Yes, your code is fine and you can use it to achieve your scenario.

    Best regards,
    Rumen
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Spell > Potential bug in radspell
Related resources for "Potential bug in radspell"

ASP.NET Spell Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer Step-by-step Tutorial  ]