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

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

0 Answers 13 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Todd
Top achievements
Rank 1
Todd asked on 01 Feb 2017, 04:48 PM

Hello,

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

https://demos.telerik.com/aspnet-ajax/scheduler/examples/draganddropintegration/defaultcs.aspx?product=scheduler

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)    
      RadGrid1.MasterTableView.Rebind()     
 ElseIf sortexpr.SortOrder = GridSortOrder.Ascending Then
sortexpr.SortOrder = GridSortOrder.Descending
            e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortexpr)     
    RadGrid1.MasterTableView.Rebind()      End If

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Todd
Top achievements
Rank 1
Share this question
or