private void HostedControl_GotFocus(object sender, EventArgs e) { RichTextEditorCellElement cell = this.Parent as RichTextEditorCellElement; if (cell != null) { cell.ColumnInfo.IsCurrent = true; cell.RowInfo.IsCurrent = true; cell.GridViewElement.BeginEdit(); } }
private void RadGridView1_CurrentCellChanged(object sender, CurrentCellChangedEventArgs e) { if (e.NewCell != null && e.NewCell.ColumnInfo is GridViewRichTextColumn) { RichTextEditorCellElement cellElement = this.radGridView1.TableElement.GetCellElement(e.NewCell.RowInfo, e.NewCell.ColumnInfo) as RichTextEditorCellElement; if (cellElement != null) { RichTextEditorElement element = (RichTextEditorElement)((RichTextEditor)cellElement.Editor).EditorElement; RadRichTextEditor textBox = (RadRichTextEditor)element.HostedControl; this.richTextEditorRibbonBar1.AssociatedRichTextEditor = textBox; Console.WriteLine(textBox.GetHashCode()); } } }