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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

multirow record rowheight question

Thread ID:

Created:

Updated:

Platform:

Replies:

55752 Feb 4,2007 07:55 PM UTC Feb 6,2007 07:46 PM UTC Windows Forms 2
loading
Tags: GridControl
Stefan Verté
Asked On February 4, 2007 07:55 PM UTC

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 |
| |
| |
---------------

Administrator [Syncfusion]
Replied On 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

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

Thanks

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;