Can this be done? I have a memo field that I want to be edited in a datagrid on a win form. I want to be able to show three lines at a time and use returns. Here is what I've tried.
Code:
DataGridTextBoxColumn colFullInfo = new DataGridTextBoxColumn();
colFullInfo.MappingName = "fullinfo";
colFullInfo.Width = 400;
colFullInfo.HeaderText = "Extended Product Info";
this.styles.GridColumnStyles.Add(colFullInfo);
this.dataGrid1.SetDataBinding(this.dataSet11, "stock");
this.styles.MappingName = "stock";
this.dataGrid1.TableStyles.Add(this.styles);
DataGridTextBoxColumn myTextBoxColumn;
myTextBoxColumn = (DataGridTextBoxColumn) this.dataGrid1.TableStyles["stock"].GridColumnStyles["fullinfo"];
DataGridTextBox myGridTextBox;
myGridTextBox = (DataGridTextBox) myTextBoxColumn.TextBox;
myGridTextBox.AcceptsReturn = true;
myGridTextBox.Multiline = true;
myGridTextBox.Height = 40;
myGridTextBox.ScrollBars = ScrollBars.Both;[code]
The only thing that works is the scroll bar. Does anyone have some ideas?
Thanks,
Mike