We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC multi-line textbox

Thread ID:

Created:

Updated:

Platform:

Replies:

36669 Nov 7,2005 07:13 AM UTC Nov 8,2005 05:34 PM UTC WinForms 2
loading
Tags: GridControl
Luke Middleton
Asked On November 7, 2005 07:13 AM UTC

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

Administrator [Syncfusion]
Replied On 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

Luke Middleton
Replied On November 8, 2005 05:34 PM UTC

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;