Grid Sorting while using the Drag and drop from grid to scheduler

1 posts, 0 answers
  1. Todd
    Todd avatar
    1 posts
    Member since:
    Jan 2014

    Posted 01 Feb 2017 Link to this post


    I'm trying to use the drag and drop functionality in the scheduler. As the demo below

    Everything works fine with drag and drop. Now i'm trying to implement the sorting on the column headers in RagdGrid. After I click any column header the grid disappears . Like there is no data in the grid . I'm using the basic sorting functionality as in one of your demo applications. I also tried using the NeedDataSource. this time I'm getting the data same as not sorted. this is the following code sample i'm using to sort the grid data . Can please help me find a way around it. 

    Thank you 

      Protected Sub RadGrid1_SortCommand(sender As Object, e As GridSortCommandEventArgs) 
     Dim sortexpr As New GridSortExpression()     
        sortexpr.FieldName = e.SortExpression  
     If sortexpr.SortOrder = GridSortOrder.Descending Or sortexpr.SortOrder = GridSortOrder.None Then
              sortexpr.SortOrder = GridSortOrder.Ascending           e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortexpr)    
     ElseIf sortexpr.SortOrder = GridSortOrder.Ascending Then
    sortexpr.SortOrder = GridSortOrder.Descending
        RadGrid1.MasterTableView.Rebind()      End If
Back to Top