Hi All,
First post as I've struggled to figure this one out, new to Telerik and .Net so possibly a bad combination!
I've taken the following snippet from the demo for using radspell with radgrid, but the problem I appear to have is that I also want to spellcheck the edit control of gridtemplatecolumns as well as gridboundcolumns. I'm trying to figure out how to just access the edit section of the gridtemplatecolumn (my attempt is currently commented out and marked PROBLEM BIT) the trouble is that whilst it works to a degree it appears to be duplicating a whole load of information when the spell checker pops up (there also appears to be a lot of white space in 'not in dictionary' area.
In short, it's misbehaving but I'm sure it must be something obvious I'm doing.
please help! I've been on this for 10 hours straight (as a learner!) and I'm fed up with it now!
Thanks in advance,
Dave
foreach (GridColumn column in editedItem.OwnerTableView.RenderColumns)
{
if (column is IGridEditableColumn && column.IsEditable)
{
IGridColumnEditor editor = editMan.GetColumnEditor(column as IGridEditableColumn);
if (editor is GridTextBoxColumnEditor)
{
string editorID = (editor as GridTextBoxColumnEditor).TextBoxControl.ClientID;
controlsToCheck.Push(editorID);
index++;
}
/*
PROBLEM BIT
if (editor is GridTemplateColumnEditor)
{
string editorID = (editor as GridTemplateColumnEditor).ContainerControl.ClientID;
controlsToCheck.Push(editorID);
index++;
}*/
}
}
RadSpell1.ControlsToCheck =
new string[index];
while (controlsToCheck.Count > 0)
{
RadSpell1.ControlsToCheck.SetValue(controlsToCheck.Pop(), controlsToCheck.Count);
}
RadSpell1.IsClientID =
true;
<telerik:GridTemplateColumn HeaderText="KSP/Benefit 1" UniqueName="cnpb_benefit1" DataField="cnpb_benefit1" Visible="False" FilterControlAltText="Filter cnpb_benefit1 column">
<ItemTemplate>
<asp:Label ID="lblcnpb_benefit1" runat="server" Text='<%# TrimDescription(Eval("cnpb_benefit1") as string) %>' />
</ItemTemplate>
<EditItemTemplate>
<telerik:RadTextBox ID="txbcnpb_benefit1" Width="450px" runat="server" TextMode="MultiLine"
Text='<%# Bind("cnpb_benefit1") %>' Height="90px" MaxLength="500" />
</EditItemTemplate>
<ItemStyle VerticalAlign="Top" />
</telerik:GridTemplateColumn>