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.

Wrap text in cell for a specific column

Thread ID:

Created:

Updated:

Platform:

Replies:

2056 Dec 12,2002 12:16 PM Feb 19,2003 06:11 PM Windows Forms 8
loading
Tags: GridControl
Soung Bae
Asked On December 12, 2002 12:16 PM

I need to wrap the text in one column in a databound grid. how do you do this? Thanks in advance

Administrator [Syncfusion]
Replied On December 12, 2002 01:21 PM

> I need to wrap the text in one column in a databound grid. how do you do this? > > Thanks in advance You can set .WrapText = true for the GridBoundColumn.StyleInfo of the GridBoundColumn for the column. Stefan

Adi Saric
Replied On February 17, 2003 01:00 PM

> > I need to wrap the text in one column in a databound grid. how do you do this? > > > > Thanks in advance > > You can set .WrapText = true for the GridBoundColumn.StyleInfo of the GridBoundColumn for the column. > > Stefan I have tried this and the text still does not wrap. At least the row height does not increase by itself. Is there a known issue with this function? I can attach/email code if necessary.

Administrator [Syncfusion]
Replied On February 17, 2003 03:22 PM

> I have tried this and the text still does not wrap. At least the row height does not increase by itself. Is there a known issue with this function? I can attach/email code if necessary. > To automatically increase row heights while the user enters text you need to set .AutoSize = true. Call Model.Rows.ResizeToFit to resize rows to fit cell contents from code. Stefan

Administrator [Syncfusion]
Replied On February 17, 2003 03:26 PM

If you want the cell to grow and wrap text as you type into the cell, there are 3 things that you need to do. The first 2 are to set both the WrapText and AutoSize properties for the column's styleinfo. The last requirement is due to a problem that we will have to correct. Right now, if the initial row height is set at the default, then the TextBox in the cell is set as a single line text, and not a multiline textbox. So currently, you need to set the default row height to be larger that its original default. Here is code that worked for me just dropping a GridDataBoundGrid onto a form. this.gridDataBoundGrid1.DefaultRowHeight += 6;

Adi Saric
Replied On February 17, 2003 03:46 PM

Thanks Clay but this did not work either. I have a hierarchy grid inside the main grid for whose column I am trying to set wrapping for. I set the default row height of the main grid to +6 and the autosize and wraptext to true for the gridboundcolumn of my second level hierarchy grid. This does increase the height of all rows by 6 pixels but it still cuts off the text in my column. I also want the row height growth to happen only for the cells that exceed it with the text length. Also my column celltype is static and not a textbox. Adi

Administrator [Syncfusion]
Replied On February 17, 2003 05:05 PM

Can you post a sample porject showing what you are trying to do?

Adi Saric
Replied On February 19, 2003 04:55 PM

Can I email you the code instead of posting?

Administrator [Syncfusion]
Replied On February 19, 2003 06:11 PM

You can open a Direct Trac support incident and attach the files to it. http://www.syncfusion.com/support/logon.asp?URL=/support/default.asp

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.

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.

;