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

spell checking a text box in a repeater

1 Answer 69 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 03 Jan 2011, 11:53 PM
Hi all,

How can I spell check the ASP:textbox TextBoxcomments in this repeater? If I specify isClientID="true" it runs but says it can't find a valid HTML item. If I remove the isClientId I get a message saying it can't be Null. Thanks in advance, Dan

<asp:Repeater ID="repeaterApproveDept" Runat="server">
                    <ItemTemplate>
                        <TR>
                            <TD class="APR_ARIAL_10PT" width="100">
                                <%# FormatName((System.Data.DataRowView)Container.DataItem)%>
                            </TD>
                            <td valign="middle">
                            <cc1:myCCFDropDownList Enabled = "false" id="Myccfdropdownlist2" runat="server" Width="100" SetValue='<%# DataBinder.Eval(Container.DataItem, "RecommendedRating")%>' AutoPostBack="False" apAssessmentID='<%# DataBinder.Eval(Container.DataItem, "apAssessmentID")%>' siStaffID='<%# DataBinder.Eval(Container.DataItem, "siStaffID")%>' DeptAssignID='<%# DataBinder.Eval(Container.DataItem, "DeptAssignID")%>' IsLeadership='<%# DataBinder.Eval(Container.DataItem, "IsLeadership")%>' BogReviewerStatus='<%# DataBinder.Eval(Container.DataItem, "BogReviewerStatus")%>' DivStatus='<%# DataBinder.Eval(Container.DataItem, "DivStatus")%>'>
                                    <asp:ListItem Value="">Not Selected</asp:ListItem>
                                    <asp:ListItem Value="E">Exceeds</asp:ListItem>
                                    <asp:ListItem Value="A">Achieves</asp:ListItem>
                                    <asp:ListItem Value="I">Needs Improvement</asp:ListItem>
                                    <asp:ListItem Value="NR">NR</asp:ListItem>
                                    <asp:ListItem Value="RET">RET</asp:ListItem>
                                    <asp:ListItem Value="TNTR">TNTR</asp:ListItem>
                                    <asp:ListItem Value="WR">WR</asp:ListItem>
                                </cc1:myCCFDropDownList>
                            </td>
  
                            <TD width="85%" valign="middle">
                                <asp:textbox cssclass="APR_ARIAL_10PT" id="TextBoxComments" TextMode="MultiLine" runat="server" Rows= 5 Columns = 140 Text='<%# DataBinder.Eval(Container.DataItem, "Comments")%>'>
                                </asp:textbox>
                            </TD>
                            <td align="center">
                                <asp:CheckBox ID="CheckBoxCompleted" Runat="server" Checked='<%# DataBinder.Eval(Container.DataItem, "IsCompleted").ToString()=="1"%>' onclick="return false;">
                                </asp:CheckBox>
                            </td>
                        </TR>
                        <tr>
                            <td colspan="4"><hr>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>

1 Answer, 1 is accepted

Sort by
0
Dan
Top achievements
Rank 1
answered on 04 Jan 2011, 05:19 PM
I figured out this one.... hope this helps someone.

//Load controlstocheck prop for spell checker.
          int i = 0;
          int x = this.repeaterApproveDept.Items.Count;
          RadSpell1.ControlsToCheck = new string[x];
          foreach (RepeaterItem SC in this.repeaterApproveDept.Items)
          {
                  TextBox SpellChecktextBoxComments = (TextBox)SC.FindControl("TextBoxComments");
                  RadSpell1.ControlsToCheck.SetValue(SpellChecktextBoxComments.ClientID, i);
                  i++;
         }
          RadSpell1.IsClientID = true;
Tags
Spell
Asked by
Dan
Top achievements
Rank 1
Answers by
Dan
Top achievements
Rank 1
Share this question
or