Hi,
I have a gridview with 2 columns and the AutoSizeColumnsMode is set to Fill.
The grid's datasource is a LinqToSql query, with both fields being strings and it's set in the Form_Load.
The width of the first column however isn't big enough for either the value or the headertext of that column.
I've tried using BestFitColumn but then both columns get a small width.
Is there some other property or something i need to set?
Below is the definition of the grid.
I have a gridview with 2 columns and the AutoSizeColumnsMode is set to Fill.
The grid's datasource is a LinqToSql query, with both fields being strings and it's set in the Form_Load.
The width of the first column however isn't big enough for either the value or the headertext of that column.
I've tried using BestFitColumn but then both columns get a small width.
Is there some other property or something i need to set?
Below is the definition of the grid.
this.radGridView1.MasterGridViewTemplate.AllowAddNewRow = false; this.radGridView1.MasterGridViewTemplate.AllowColumnReorder = false; this.radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; gridViewTextBoxColumn1.AllowResize = false; gridViewTextBoxColumn1.AllowSort = false; gridViewTextBoxColumn1.FieldName = "Ordernumber"; gridViewTextBoxColumn1.HeaderText = "Ordernumber"; gridViewTextBoxColumn1.UniqueName = "OrdernumberColumn"; gridViewTextBoxColumn2.AllowResize = false; gridViewTextBoxColumn2.FieldName = "OrderProduct"; gridViewTextBoxColumn2.HeaderText = "Product"; gridViewTextBoxColumn2.UniqueName = "OrderProductColumn"; this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn1); this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn2); this.radGridView1.MasterGridViewTemplate.EnableGrouping = false; this.radGridView1.Name = "radGridView1"; this.radGridView1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1); this.radGridView1.ReadOnly = true;