Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Spell > Single RadSpell for multiple controls in a web user control or repeater
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Single RadSpell for multiple controls in a web user control or repeater

Feed from this thread
  • Milind Raje avatar

    Posted on Aug 12, 2010 (permalink)

    I have multiple text boxes in a data repeater. How do I associate all the text boxes to a single RadSpell? The problem is I am unable to assign the "controlsToCheck" property. I do not want multiple spell check control for each item in the repeater. Using ClientID property of the textbox control gives an exception.
    Thanks
    milind

  • Rumen Rumen admin's avatar

    Posted on Aug 17, 2010 (permalink)

    Hi Milind,

    In order to check more than one control, you should set only the ControlsToCheck property and separate the control IDs with commas. For your convenience I have attached a sample page with single instance of RadSpell configured to spell check two RadTextBoxes controls placed in FormTemplate of RadGrid.

    All the best,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
    Attached files

  • Milind Raje avatar

    Posted on Aug 17, 2010 (permalink)

    hi Rumen,
    Thanks for responding to my post. Actually my problem is that I have a web user control that has a couple of text boxes that need to be spell checked. Then I have a repeater in the main page that inserts multiple instances of the web control.

    For example:
    <web control><textbox1> <textbox2></web control>

    <repeater>
    <instance 1 of web control></instance 1 of web control>
    <instance 2 of web control></instance 2 of web control>
    ....
    .....
    ....
    </repeater>

    <rad spell></radspell>

    I would like the single rad spell to check all the text boxes (which are part of the web user control) in the repeater. The number of instances of the web user control is tied to the data source used to bind to the repeater as a result I don't know how many text boxes controls before hand. That's only known at run time. Therefore, the comma-delimited controlsToCheck property has to be set in code-behind. Unfortunately using the "ClientID" property of the textboxes doesn't work.

    thanks
    milind

  • Abid Shaik avatar

    Posted on Aug 19, 2010 (permalink)

    Even I have the same issue. I have User Control and it has many textboxes and dropdowns in it. I Load User Controls Dynamically in a panel. I need to check spelling for a textbox in all the user controls with a single Spell check on the page. I'm not sure how I can get this. This is how my User Control looks like. Each and every Row is a user control here. I'd like to add the Multiline textbox of the user control to check the spelling. 

    Thanks

    Abid 
    Attached files

  • Abid Shaik avatar

    Posted on Aug 19, 2010 (permalink)

    Hey Milind/Rumen.

    I have done this in this way. It worked for me. Hope it works for you too. Make sure you set

    IsClientID

     

    ="True" in

     

    <

     

    telerik:RadSpell ID="RadSpellActions" runat="server" IsClientID="True" />

     

     

    //Method you can add and call from Page_Load 
      private void AddControlsForSpellCheck()
        {
            StringBuilder sb = new StringBuilder();
            string controlsToAdd;
            if (PanelForUserControls.HasControls())
            {
    //UserControlName is the user control you created ex: UserControlName.ascx
                foreach (UserControlName uc in PnlActionItem.Controls)
                {
    //TxtBxActionItemSummary is the ID of the TextBox in your UserControl
                    TextBox txtBxAIsummary= (TextBox)uc .FindControl("TxtBxActionItemSummary");
                    sb.Append(txtBxAIsummary.ClientID);
                    sb.Append(",");
                }
                controlsToAdd = sb.ToString();
                 //ControlsToCheck takes string[] and string.Split() returns string[] 
                RadSpellActions.ControlsToCheck = controlsToAdd.Split(new Char[] {','},StringSplitOptions.RemoveEmptyEntries);
            }
        }

    Thanks

    Abid

     

     

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Spell > Single RadSpell for multiple controls in a web user control or repeater