Hi,
I wand display in dataGrid (winform application) column with multiline
TextBox. In source code I've function:
private void DGFormat()
{
DataGridTableStyle myStyle = new DataGridTableStyle();
DataGridColumnStyle kKontroler = new DataGridTextBoxColumn();
kKontroler.MappingName = "uiName";
kKontroler.Alignment = HorizontalAlignment.Left;
kKontroler.Width = 120;
kKontroler.HeaderText = @"Name";
DataGridTextBoxColumn tbc = new DataGridTextBoxColumn();
tbc.MappingName = "Description";
tbc.HeaderText = "My Description";
tbc.TextBox.Multiline = true;
tbc.TextBox.WordWrap = true;
tbc.Width = 50;
tbc.TextBox.WordWrap = true;
DataGridColumnStyle[] columnRange = { kKontroler,tbc};
myStyle.MappingName = "People";
myStyle.GridColumnStyles.AddRange(columnRange);
myStyle.ForeColor = Color.Navy;
myStyle.BackColor = Color.LightSteelBlue;
dataGrid1.TableStyles.Add(myStyle);
}
If I use this function dataGrid have new format but not have column with
word wrap, multiline. What is not correct. Please help me,
Thx Pawel