Unplanned
Last Updated: 31 Oct 2018 08:11 by ADMIN
ADMIN
Mihail
Created on: 12 Jun 2015 11:18
Category: RichTextBox
Type: Feature Request
2
RichTextBox: Introduce Split Table Command

Introduce Split Table Command. In MS Word, the command is in Table Tools -> Layout -> Merge -> Split table. Workaround: Use the RadDocumentEditor API to split the table:

 

var tableRowBox = this.radRichTextBox.Document.CaretPosition.GetCurrentTableRowBox();
if (tableRowBox != null)
{
    this.radRichTextBox.BeginUndoGroup();

    this.radRichTextBox.Document.Selection.Clear();

    var currentRow = tableRowBox.AssociatedTableRow;

    DocumentPosition start = new DocumentPosition(currentRow.GetRootDocument());
    start.MoveToStartOfDocumentElement(currentRow);

    DocumentPosition end = new DocumentPosition(start);
    end.MoveToEndOfDocumentElement(currentRow.Table.Rows.Last);

    this.radRichTextBox.Document.Selection.SetSelectionStart(start);
    this.radRichTextBox.Document.Selection.AddSelectionEnd(end);

    this.radRichTextBox.Cut();

    this.radRichTextBox.InsertParagraph();
    this.radRichTextBox.Paste();

    this.radRichTextBox.EndUndoGroup("Split table");
}

 

2 comments
ADMIN
Tanya
Posted on: 29 Mar 2018 12:23
Hi Thomas,

Make sure to cast your vote for its implementation as this will directly affect the priority of the task.
Thomas
Posted on: 12 Sep 2017 05:38
Hi 
this would be a cool feature to increase the user acceptance.