Welcome to the Xceed Community | Help
Community Search  
More Search Options

Custom Paging with Sorting

Sort Posts: Previous Next
  •  08-29-2009, 10:03 AM Post no. 23583

    Custom Paging with Sorting

    Hey all,

    I have a generic search form control for a large application.
    The columns are being generated at runtime and the paging and sorting is being done server side.

    This was developed before I knew anything about the DataGridVirtualizingQueryableCollectionView.
    I am using a web service to deliver the data payloads.

    The ItemSource is being set in code like so:
    dataGridControl1.ItemsSource = arraySource.Skip((PageNumber - 1) * ResultLimit).Take(
    this.ResultLimit);

    Everything is working perfectly with the exception of the sorting.
    When I click on the column header I am catching the PreviwMouseUp event to fire the custom sorting:

    private void ColumnManagerCell_PreviewMouseUp(object sender, MouseButtonEventArgs e)
    {
       
    if (dataGridControl1.Columns != null)
        {
            e.Handled =
    true;
           RaiseEvent(
    new ColumnResortRoutedEventArgs(MiniPager.ColumnResortedEvent,(sender as ColumnManagerCell).ParentColumn as 
           Xceed.Wpf.DataGrid.
    Column));
         }
    }

    The sorted grid results are returned but then the Xceed sorting fires.
    I trued to add the e.Handled = true but that did not seem to help.

    I am currently reviewing the Data Virtualization example, but any help would be much appreciated.
    I just to need to prevent the built in sorting from firing without disabling sort on the columns.

    Thanks.



     



     

     

    Filed under: ,
  •  10-05-2009, 8:14 AM Post no. 24309 in reply to 23583

    Re: Custom Paging with Sorting

    I'm having the same issue, did you find a way to workaround this?
  •  10-05-2009, 2:19 PM Post no. 24318 in reply to 24309

    Re: Custom Paging with Sorting

    Hi Jason,

    It is not possible to prevent the native sorting from firing and to raise your own event without modifying the source code.

    You should get the blueprint edition source code and override the OnMouseLeftButtonUp event handler.


    Xceed - Software Developer and Technical Support
  •  10-06-2009, 10:48 AM Post no. 24335 in reply to 24318

    Re: Custom Paging with Sorting

    Hello,

    Jason

    Do you want the sorting to be disable from the Column Manager(Header) MouseLeftButtonUp Event or from anywhere else?

    Thanks,

    Paras Sanghani

     

     


    Nothing Is Impossible
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.