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

[Solved] Grid Column Resize doesn't work

3 Answers 201 Views
Grid
This is a migrated thread and some comments may be shown as answers.
adi
Top achievements
Rank 1
adi asked on 21 Feb 2008, 02:08 PM
Hi,

I create a RadGrid programmatically. Then I add it to a placeholder control of my usercontrol. It is displayed. Now I like to resize and to reorder the columns. But resize doesn't work. Reorder does. What is wrong?

Here are my settings for my grid:
Dim rGrid As New Telerik.Web.UI.RadGrid     
Dim AddButton As New GridButtonColumn     
Dim DeleteButton As New GridButtonColumn     
Dim Countries As New GridBoundColumn     
rGrid.MasterTableView.TableLayout = GridTableLayout.Fixed     
rGrid.ClientSettings.Scrolling.AllowScroll = True    
rGrid.ClientSettings.Scrolling.UseStaticHeaders = True    
rGrid.Height = 410     
    
rGrid.AutoGenerateColumns = False    
rGrid.AllowSorting = True    
rGrid.AllowPaging = True    
rGrid.HeaderStyle.HorizontalAlign = HorizontalAlign.Center     
rGrid.ClientSettings.AllowColumnsReorder = True    
rGrid.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Reorder     
rGrid.PageSize = 10     
rGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric     
    
rGrid.MasterTableView.Columns.Add(AddButton)     
rGrid.MasterTableView.Columns.Add(DeleteButton)     
rGrid.MasterTableView.Columns.Add(Countries)     
    
AddButton.HeaderStyle.Width = 25     
DeleteButton.HeaderStyle.Width = 25     
Countries.HeaderStyle.Width = 80     
    
rGrid.EnableEmbeddedSkins = False    
rGrid.ClientSettings.Selecting.AllowRowSelect = True    
rGrid.ClientSettings.Resizing.AllowColumnResize = True    
rGrid.ClientSettings.Resizing.EnableRealTimeResize = True    
rGrid.ClientSettings.Resizing.ResizeGridOnColumnResize = True    
 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Feb 2008, 01:51 PM
Hello adi,

Please add <style type="text/css">html, body, form {margin:0px;}</style> to the Page header and let us know how it goes.

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
adi
Top achievements
Rank 1
answered on 25 Feb 2008, 05:58 PM
Hi Vlad,

thank you for reply. I have tried it and it works. What's the problem?

Best regards,
Adi
0
Vlad
Telerik team
answered on 27 Feb 2008, 12:49 PM
Hello Adi,

By default there is a body margin in IE which is not included in mouse event position calculation.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
adi
Top achievements
Rank 1
Answers by
Vlad
Telerik team
adi
Top achievements
Rank 1
Share this question
or