Get data from a column

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

1 Reply

MG Mohanraj Gunasekaran Syncfusion Team February 22, 2017 11:37 AM UTC

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. 


Loader.
Up arrow icon