Dear Support,
Suppose I create programmatically a table of 3 rows by 2 columns...
TableAdv table = new TableAdv();
for (int i = 0; i < 3; i++)
{
TableRowAdv row = new TableAdvRow();
for (int j = 0; j < 2; j++)
{
TableCellAdv cell = new TableCellAdv
{
CellFormat = userDefinedCellFormat
};
row.Cells.Add(cell);
}
table.Rows.Add(row);
}
... then add it to my SfRichTextBoxAdv control...
this.Document.Sections[0].Blocks.Clear();
this.Document.Sections[0].Blocks.Add(table);
... and select a series of cells programmatically, in this case, the cells of the 2nd row...
TextPosition beg = this.Document.GetTextPosition("0;0;1;0;0;0");
TextPosition end = this.Document.GetTextPosition("0;0;1;1;0;0");
end.MoveToParagraphend();
this.Selection.Select(beg, end);
this.Focus(FocusState.Programmatic);
Using the Merge Cells command...
this.MergeSelectedCellsCommand.Execute(null);
... has no effect on the selected cells and so I want to see how those cells, or any combination of contiguous cells that are selected, can be merged programmatically. Is this possible?
Note: If I use commands to create the table and to do the selection, the Merge Cells command works. But everything needs to be done programmatically, so commands can't be used.
Best Regards,
Michael