void IC1FlexGridRowDetail.UpdateSize(C1FlexGrid parentGrid, int rowIndex, Size proposedSize)
{
// accuire size of partent grid's scrollable area
var srSz = parentGrid.ScrollableRectangle.Size;
// measure the size of C1Label's text, which fits into parent's grid scrollable area width
var sz = TextRenderer.MeasureText(Text, Font, srSz, TextFormatFlags.WordBreak);
// chose the maximum width between scrollable area and measured text
sz.Width = Math.Max(sz.Width, srSz.Width);
// assign calculated size as control's size
Size = sz;
}