Hi,
When I update a table cell in a richtextbox the table is locked and I am unable to edit the table in the UI. The change to the table cell is not shown in the
UI If I then close the current document and re-open it its fine and I can see the change made to the table cell, or if I make a change to a paragraph above the table from within the UI the change to the cell is shown, and the table is unlocked.
public void SetTemplateFromElement(string tagValue, string newValue)
{
try
{
// RadDocument document = doc_text.Document;
var table = doc_text.Document.EnumerateChildrenOfType<Table>().Where(x => x.Tag == tagValue).FirstOrDefault();
if (table != null)
{
switch (tagValue)
{
case "1000":
var row = table.EnumerateChildrenOfType<TableRow>().FirstOrDefault();
var cell = row.Cells.ToList()[1];
cell.Blocks.Clear();
Paragraph p = new Paragraph();
Span s = new Span();
s.FontWeight = FontWeights.Bold;
s.FontFamily = new FontFamily(CGlobals.docu_default_font);
s.FontSize = Unit.PointToDip(CGlobals.docu_default_font_size);
s.Text = newValue; ;
p.Inlines.Add(s);
cell.Blocks.Add(p);
break;
case "4000":
break;
}
// doc_text.Document = document;
doc_text.UpdateLayout();
SaveContent(strCurrentDoc);
}
}
catch { }
}
Can someone please advise.