We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

multirow record rowheight question

Hi,

I try to implement a multirow record GDBG
like below, field 8is a multiline text with 3
lines of text of more. Now I would like to set the height of this field manually. How can I do
That? And how can i show '...' i more than 3 lines of text is available.
|1|2|3|4|5|6|7|
---------------
|8 |
| |
| |
---------------

2 Replies

AD Administrator Syncfusion Team February 5, 2007 07:18 PM UTC

Hi Stefan,

You use the Model.RowHeights.ResizeToFit method to resize the cell height based on its content. Please refer to the attached sample for more details.

int colIndex = GetColIndexFromLayoutColumn("col8", layoutcolumns);
this.gridDataBoundGrid1.Model.RowHeights.ResizeToFit(GridRangeInfo.Col(colIndex));

string[] layoutcolumns;
private int GetColIndexFromLayoutColumn(string ColumnName,string[] columns)
{
if( columns != null && columns.Length == 0 )
return -1;
int j = 0;
for(int i = 0;i < columns.Length;i++)
{
j++;
if( columns[i] == ColumnName )
return j;
else if( columns[i] == ".")
j = 0;
}
return j;
}

Here is a sample.
GDBGResizeToFit.zip

Best Regards,
Haneef


SV Stefan Verté February 6, 2007 07:46 PM UTC

Thanks

Loader.
Live Chat Icon For mobile
Up arrow icon