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.