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

Inserting new row in table issue.

5 Answers 37 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
muhammad
Top achievements
Rank 1
muhammad asked on 22 Aug 2012, 01:04 PM
Hi,
    I have found that if you add a new row in table it selects the whole new row which is fine but if you want to add an other row by right clicking to selected row it disable all the options in insert menu from context menu. Any work around for the issue?

Regards.

5 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 24 Aug 2012, 11:05 AM
Hello Muhammad,

If you have added a row using the context menu or the ribbon, the new row will be selected. In order to be able to add a new row again, you should just clear the selection by clicking the left button somewhere in the new row. Then you will be able to insert another row from the Insert part of the context menu.

Hope this helps.

Regards,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
muhammad
Top achievements
Rank 1
answered on 24 Aug 2012, 03:38 PM
Todor,
            Thanks for your reply. Yes it works in that way but its an overhead of an extra click each time. If you have to add new 100 rows or more then you can imagin the pain of an other click on some other place in the row. Is there any plan for removing this bug?
0
Todor
Telerik team
answered on 27 Aug 2012, 01:30 PM
Hi Muhammad,

At this point we have not planned to change the cases when the commands can be executed. What you can do is to handle the CommandExecuted event of RadRichTextBox and clear the selection from the newly inserted row/column. In this way, there will be no selection in the document after the command for adding a row/column has been executed and it will be possible to execute the command again. Here is how this can be done:
void radRichTextBox1_CommandExecuted(object sender, CommandExecutedEventArgs e)
{
    if (e.Command is InsertTableRowCommand || e.Command is InsertTableRowAboveCommand || e.Command is InsertTableRowBelowCommand ||
        e.Command is InsertTableColumnCommand|| e.Command is InsertTableColumnToTheLeftCommand|| e.Command is InsertTableColumnToTheRightCommand)
    {
        ((RadRichTextBox)sender).Document.Selection.Clear();
    }
}

I hope this helps.

Greetings,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
muhammad
Top achievements
Rank 1
answered on 28 Aug 2012, 12:08 PM
Todor,
          Thanks for your reply. I already have implemented this method, But need some more discrete solution for the problem.

Regards,
0
Todor
Telerik team
answered on 30 Aug 2012, 04:02 PM
Hello Muhammad,

As previously mentioned, we have not scheduled this task yet. We have logged it in our public issue tracking system. Here you can observe its status.
 
Kind regards,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
muhammad
Top achievements
Rank 1
Answers by
Todor
Telerik team
muhammad
Top achievements
Rank 1
Share this question
or