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.
Unfortunately, activation email could not send to your email. Please try again.

GGC multi-line textbox

Thread ID:

Created:

Updated:

Platform:

Replies:

36669 Nov 7,2005 02:13 AM Nov 8,2005 12:34 PM Windows Forms 2
loading
Tags: GridControl
Luke Middleton
Asked On November 7, 2005 02:13 AM

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 05:12 AM

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 12:34 PM

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.

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.

;