|
-
March 25th, 2003, 11:57 AM
#1
Wordwrap or Multiline Datagrids?
Has anyone figured out how to give the ability to Wordwrap or Multiline a Datagrid's column? What I will probably do is set columns to different/same column width then have the ability for each column to have Wordwrap or Multiline. Thanks in advanced!!!!
-
March 25th, 2003, 02:02 PM
#2
only thing that i think of is use Format/FormatInfo of DataGridTextBoxColumn.
you can always check the size of the box and wrap it manually.
Paresh
- Software Architect
-
March 25th, 2003, 02:36 PM
#3
Do you have or know of any examples of the DataGridTextBoxColumn?
-
March 25th, 2003, 02:42 PM
#4
public class MyDataGridTextBoxColumn : DataGridTextBoxColumn
{
private void HandleKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
}
/// blah blah events
}
and now some where in your code,
MyDataGridTextBoxColumn aColumnTextColumn = new MyDataGridTextBoxColumn() ;
aColumnTextColumn.HeaderText = ...
aColumnTextColumn.MappingName = ....
tableStyle.GridColumnStyles.Add(aColumnTextColumn);
you can add this tableStyle to current datagrid by
dataGridMyGrid.TableStyles.Add(tableStyle); // you can add as much styles you want and thus randomly chaning the styles at run time also.
-Paresh
- Software Architect
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|