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

Strange Dock Resize on Header Click

4 Answers 77 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Kurt
Top achievements
Rank 1
Kurt asked on 21 Mar 2009, 11:41 PM
Hi,

I'm dynamically creating floating gadgets from Docks and almost everything is working as desired.  I noticed that when I click the header of a floating dock, the width of the dock grows by exactly 5px.  Strange, as I have no javascript tied to the event...  I do have some custom javascript that I'm using for saving the X,Y cooridnates of the Dock after moving from Client to Server Side, but even with that disabled, the behavior persists.  My code is as follows:

Protected Sub ReturnUserGadgets(byval user as string)  
        Dim ds As New DataSet  
        ds = odata.ReturnDS("sp_GadgetLoadByUser""@GadgetUser", user)  
 
        Dim i, cnt As Integer 
        cnt = ds.Tables("Generic").Rows.Count  
 
        For i = 0 To cnt - 1  
            Dim dock As New RadDock()  
            Dim widget As New UserControl  
            widget = LoadControl(ds.Tables("Generic").Rows(i).Item("GadgetContent"))  
 
            With dock  
                .ID = user & "_" & ds.Tables("Generic").Rows(i).Item("GadgetName")  
                .Title = ds.Tables("Generic").Rows(i).Item("GadgetName")  
                .Skin = "Office2007" 
                .UniqueName = Guid.NewGuid().ToString()  
                .Width = CInt(ds.Tables("Generic").Rows(i).Item("GadgetWidth"))  
                .Height = CInt(ds.Tables("Generic").Rows(i).Item("GadgetHeight"))  
                .Left = CInt(ds.Tables("Generic").Rows(i).Item("GadgetX"))  
                .Top = CInt(ds.Tables("Generic").Rows(i).Item("GadgetY"))  
                .Resizable = False 
                .Pinned = False 
                .DockMode = DockMode.Floating  
                '.OnClientDragEnd = "Moved"  
                '.OnClientDragStart = "OnClientDragStart"  
                .ContentContainer.Controls.Add(widget)  
            End With 
            RadDockLayout1.Controls.Add(dock)  
        Next i  
 
        ds.Clear()  
        ds.Dispose()  
        ds = Nothing 
    End Sub 

4 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 24 Mar 2009, 08:15 AM
Hi Kurt,

My suggestion is  to remove the widget in the RadDock and try to reproduce the problem. If everything looks fine, I think that the reason for such behavior is that the widget gets resized and it resizes RadDock.
If you are unable to find the cause of the problem, please open a new support thread and send us a running project where we could observe it locally. Once we receive it we will do our best to help you.

Regards,
Petio Petkov
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Kurt
Top achievements
Rank 1
answered on 24 Mar 2009, 02:59 PM
Hi,

I took the content out and replaced it with just "Test" for a text property.  The resize behavoir persists.  I'll see if I can find a solution.  By the way, just wanted to tell you that your stuff is leaps and bounds better than Infragistics. 
0
Petio Petkov
Telerik team
answered on 26 Mar 2009, 04:12 PM
Hello Kurt,

I managed to reproduce the problem under IE8 - thank you for bringing it to our attention. We will fix this problem for SP1 that will appear in 2 weeks at latest.

Your points were updated.

All the best,
Petio Petkov
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Kurt
Top achievements
Rank 1
answered on 29 Mar 2009, 04:29 AM
Wow, you guys are awesome.  Forgot to even say that I was using IE8-- I should have known since it doesn't do it in FireFox.  I was able to work around this anyhow by using a JSON/AJAX solution that gets the dynamic dock's height/width from the database and attaching a simple JS function to the OnClientDragEnd event.  It tries to grow, but aptly goes back to normal a split second later.  Good enough until SP1. 

Again, kudos.
Tags
Dock
Asked by
Kurt
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Kurt
Top achievements
Rank 1
Share this question
or