This is a migrated thread and some comments may be shown as answers.

Grid forcing column width downward

2 Answers 59 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Melanie asked on 29 Nov 2012, 09:14 PM
I am using a grid control and when I enable the show group panel and enable that functionality, my columns are shrunk down to fit in the window. There is no overflow shown at all. This issue can be resolved by putting the browser (IE) in to IE8 compatibility Mode with and IE 8 Document Mode. The issue with this is when I make this change, the columns in my grid no longer line up with the header. This issue goes away completely if I remove static headers and scrolling but I need both of those things. This is the grid creation code from the code behind in C#:
protected virtual void SetupGridProperties(int pageSize)
            _gridObj.Width = Unit.Percentage(97);
            _gridObj.Height = Unit.Percentage(95);
            _gridObj.ID = "gridRpt";
            _gridObj.Skin = ConfigurationManager.AppSettings.Get("WebGridStyle");
            _gridObj.AllowPaging = true;
            _gridObj.PageSize = pageSize;
            _gridObj.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced;
            _gridObj.PagerStyle.Position = GridPagerPosition.Top;
            _gridObj.PagerStyle.AlwaysVisible = false;
            _gridObj.AllowSorting = true;
            _gridObj.GridLines = GridLines.Both;
            _gridObj.AllowMultiRowSelection = false;
            _gridObj.ClientSettings.AllowColumnsReorder = true;
            _gridObj.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Reorder;
            _gridObj.ClientSettings.Selecting.AllowRowSelect = true;
            _gridObj.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.SingleCell;
            _gridObj.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.MultiCell;
           // _gridObj.ClientSettings.Selecting.AllowCellSelect = true;
           // _gridObj.ClientSettings.Selecting.AllowMultiCellSelect = true;
            _gridObj.ClientSettings.ClientEvents.OnGridCreated = "gridRpt_GridCreated";
            //_gridObj.ClientSettings.ClientEvents.OnRowMouseOver = "_gridObj_RowMouseOver";
            _gridObj.ClientSettings.ClientEvents.OnRowSelecting = "gridRpt_OnRowSelecting";
            _gridObj.ClientSettings.ClientEvents.OnRowDeselecting = "gridRpt_OnRowDeSelecting";
            _gridObj.ClientSettings.ClientEvents.OnRowClick = "gridRpt_OnRowClick";
            //_gridObj.ClientSettings.Resizing.AllowRowResize = true;
            _gridObj.ClientSettings.Scrolling.AllowScroll = true;
            _gridObj.ClientSettings.Scrolling.UseStaticHeaders = true;
            _gridObj.GroupPanel.Visible = false;
            _gridObj.ClientSettings.AllowDragToGroup = true;
            _gridObj.GroupingEnabled = true;
            _gridObj.ShowGroupPanel = true;
            _gridObj.GroupPanel.Enabled = true;
            _gridObj.MasterTableView.TableLayout = GridTableLayout.Auto;
            _gridObj.ItemStyle.VerticalAlign = VerticalAlign.Middle;
            //this._gridObj.ExportSettings.IgnorePaging = true;
            //this._gridObj.ExportSettings.OpenInNewWindow = true;
            //this._gridObj.ExportSettings.IgnorePaging = true;
            _gridObj.MasterTableView.SortExpressions.AllowNaturalSort = false;
            _gridObj.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind;
            _gridObj.AutoGenerateColumns = false;
            _gridObj.MasterTableView.AutoGenerateColumns = false;

This is a link to what I am seeing: BROKEN GRID . This only happens when I drag a column to group by.

2 Answers, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 30 Nov 2012, 01:04 PM
Still looking for a fix for this, anyone else ever experienced this?
Telerik team
answered on 04 Dec 2012, 03:31 PM
Hello Robert,

As you can see from our online example there is no misalignment in IE8 Compatibility Mode:

The described problem can be observed if you use custom styles for the grid and you set different paddings for headers and items.

the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Telerik team
Share this question