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.

Get data from a column

Thread ID:

Created:

Updated:

Platform:

Replies:

129006 Feb 21,2017 05:19 AM Feb 22,2017 06:37 AM Windows Forms 1
loading
Tags: GridControl
Slava
Asked On February 21, 2017 05:19 AM

Hello! Do not tell me there is a column number 6, for example in which the numbers. How to display all digits of a given column in textBox

Mohanraj Gunasekaran [Syncfusion]
Replied On February 22, 2017 06:37 AM

Hi Slava, 

Thanks for using Syncfusion products. 

Please find your responses in below table 
Query 
Solution 
How to display all digitsof a given column in textBox 
 
Solution1: 
In order to display all digits of a given column in textbox, you can use the ResizeToFit method for that column. Please refer to the below code example and attached sample,   
 
Code example 
this.gridControl1.Model.ColWidths.ResizeToFit(GridRangeInfo.Col(6)); 
 
Screenshot 
 
 


Solution2: 
In order to resize the column width based on the given data while typing, the below properties have to be set, 
 
Code example 
this.gridControl1.TableStyle.WrapText = false; 
this.gridControl1.TableStyle.AutoSize = true; 
this.gridControl1.Model.Options.UseRightToLeftCompatibleTextBox = false; 
this.gridControl1.AllowTextBoxAutoSize = true; 
 
Screen shot 
 


 
Sample link: GridControl  
 
Please let us know, if you required any further assistance on this.   

Regards, 
Mohanraj G. 


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.

;