GGC multi-line textbox

I would like to allow multiple lines of text to be entered in the cell of a GridGroupingControl. 1. I can not get the cell to accept an ''enter'' key. 2. As I type, the line does not wrap and the row height does not resize. I have no problem getting this to work in a non-grouping grid. Could you tell my what I''m missing? I tried the following with no success: grid.TableDescriptor.Columns["text"].Appearance.AnyRecordFieldCell.WrapText = true; grid.TableDescriptor.Columns["text"].Appearance.AnyRecordFieldCell.AutoSize = true; grid.TableDescriptor.Columns["text"].Appearance.AnyRecordFieldCell.AllowEnter =true; Thanks, -Luke

2 Replies

AD Administrator Syncfusion Team November 8, 2005 10:12 AM UTC

Hi Luke, It''s tricky. For the main table you can get it working by setting the .AllowTextBoxAutoSize = true; .WantEnterKey = false; properties and also handle protected override bool ProcessDialogKey(Keys keyData) { if (keyData == Keys.Enter) { GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; cc = cc.Renderer.GetNestedCurrentCell(); if (cc.Renderer.Control is TextBoxBase) ((TextBoxBase) cc.Renderer.Control).SelectedText = "\r"; } return base.ProcessDialogKey(keyData); } I couldn''t get the autosize working however for the nested tables in the example. Example: ResizableRowsAndAllowEnter.zip Stefan >I would like to allow multiple lines of text to be entered in the cell of a GridGroupingControl. >1. I can not get the cell to accept an ''enter'' key. >2. As I type, the line does not wrap and the row height does not resize. > >I have no problem getting this to work in a non-grouping grid. Could you tell my what I''m missing? > >I tried the following with no success: > grid.TableDescriptor.Columns["text"].Appearance.AnyRecordFieldCell.WrapText = true; > grid.TableDescriptor.Columns["text"].Appearance.AnyRecordFieldCell.AutoSize = true; > grid.TableDescriptor.Columns["text"].Appearance.AnyRecordFieldCell.AllowEnter =true; > > >Thanks, >-Luke


LM Luke Middleton November 8, 2005 05:34 PM UTC

Thanks. That helped a lot. I''m glad I asked.

Loader.
Up arrow icon