Strange Dock Resize on Header Click

5 posts, 0 answers
  1. Kurt
    Kurt avatar
    26 posts
    Member since:
    Mar 2009

    Posted 21 Mar 2009 Link to this post

    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 
  2. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 24 Mar 2009 Link to this post

    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.
  3. Kurt
    Kurt avatar
    26 posts
    Member since:
    Mar 2009

    Posted 24 Mar 2009 Link to this post

    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. 
  4. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 26 Mar 2009 Link to this post

    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.
  5. Kurt
    Kurt avatar
    26 posts
    Member since:
    Mar 2009

    Posted 28 Mar 2009 Link to this post

    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.
Back to Top