I have a button which inserts a table.
I want to modify some properties on the table after it is inserted.
I want to set fontsize, fontfamily, change border and cell color to RED and make it so that the table will always fill the available width. Is this a possibility? Or do I have to manually build out the entire table and insert at cursor location?
myRichTextBox.InsertTable(2,4)
I want to modify some properties on the table after it is inserted.
I want to set fontsize, fontfamily, change border and cell color to RED and make it so that the table will always fill the available width. Is this a possibility? Or do I have to manually build out the entire table and insert at cursor location?
Hi Patrick,
You can use the following approach to get the table and set its properties:
radRichTextBox.InsertTable(4, 2); var table = radRichTextBox.Document.CaretPosition.GetCurrentTable(); table.Borders = new TableBorders(new Telerik.Windows.Documents.Model.Border(BorderStyle.Single, Colors.Red)); radRichTextBox.UpdateEditorLayout();