RadDock sorting

I have a task that inserts a tabbed document into a RadDock control. I needed a routine that would re-sort the tabs for me.

Related Articles

... and you 'll find more on the Telerik ASPNET Menu

 

Sub SortDocumentWindows(oRadDock As RadDock)
    Try
        If oRadDock.DockWindows.Count <= 1 Then
            Exit Sub
        End If
        Dim intIndex As Int16 = 0
        Dim oDockWindows As System.Linq.IOrderedEnumerable(Of DockWindow) = oRadDock.DockWindows.OrderBy(Function(oDockWindow2) oDockWindow2.Text)
        For Each oDockWindow In oDockWindows
            oDockWindow.DockTabStrip.Controls.SetChildIndex(oDockWindow, intIndex)
            intIndex += 1
        Next
 
    Catch ex As Exception
        ErrorHandler.globalErrorHandler(ex, True)
    End Try
End Sub

 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences