Just to say that I have done the same and it works OK in my grid - so the
wordwrap can be made to work !
There may be somnethign about the way you are creating and adding the
ColumnStyles, or the TableStyle, to the grid
Can you post a bit more code showing how "dgc" is added to the DataGrid
TableStyle
--
****************************************************************************
andrewbingham.com
tel 01223 514674 (Cambridge)
mobile 07970 161057
fax 07970 601283
email Andrew@AndrewBingham.com
DISCLAIMER, PLEASE NOTE:
This communication is for the attention of the named recipient only
The content should not be passed on to any other person.
It is sent in good faith, in confidence, and without legal responsibility.
VIRUS CHECK
Emails and attachments are virus checked using Norton® AntiVirus®
2002 which is regularly updated. However it remains the recipients
responsibility to check emails and attachments sent, or forwarded,
from andrewbingham.com for viruses and macro viruses
****************************************************************************
[quoted text, click to view] "Sangeetha" <anonymous@discussions.microsoft.com> wrote in message
news:735EF583-BBF4-4E2D-9F2E-3FEB3A761209@microsoft.com...
> I have a datagrid column which I want to expand when i type in some text.
Initially I tried increasing the column width on the key down event of that
DataGridTextBoxColumn, but it didn't work out as expected. Now, I am trying
to increase the height of the row to make it as a multiline column.
[quoted text, click to view] >
> private DataGridTextBoxColumn dgcComments;
> dgcComments = new DataGridTextBoxColumn();
> dgcComments.TextBox.Multiline = true;
> dgcComments.TextBox.AcceptsReturn = true;
> dgcComments.TextBox.WordWrap = true;
>
> I am able to increase the row height, but the text is not wrapping to fit
the row height. The text keeps scrolling to the left in a single line. I
have set the WordWrap property to True and Multiline property to True, but
it doesn't seem to work. Another thing that I tried is to display a vertical
scroll bar, but that also fails to meet the reqmt. Anybody has any idea how
to wrap text in a text box column of datagrid ?
[quoted text, click to view] > Sangeetha.