This is a migrated thread and some comments may be shown as answers.

Potential bug in radspell

3 Answers 45 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Ahmed Al-Asaad
Top achievements
Rank 1
Ahmed Al-Asaad asked on 24 Aug 2011, 06:50 PM
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

3 Answers, 1 is accepted

Sort by
0
Ahmed Al-Asaad
Top achievements
Rank 1
answered on 24 Aug 2011, 08:39 PM
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
0
Ahmed
Top achievements
Rank 1
answered on 28 Aug 2011, 04:43 AM
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.
0
Rumen
Telerik team
answered on 30 Aug 2011, 02:01 PM
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 >>

Tags
Spell
Asked by
Ahmed Al-Asaad
Top achievements
Rank 1
Answers by
Ahmed Al-Asaad
Top achievements
Rank 1
Ahmed
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or