I am using the XamGrid vs. the XamDataGrid so I hope this is the correct forum for my question. I have also seen this previous post but I did not understand the attached code solution. (http://ko.infragistics.com/community/forums/p/63907/324095.aspx)I am using .NET 4.0 to build a client application that uses the Infragistics XamGrid to show records for large tables. In the client code we create a .NET DataTable with the correct number of fields and rows as the source table has on the server, but the only value for each row is its primary key which is a simple int. As the user requests a page of records (1000 per page) then the rest of the columns are fetched from the server and written into the data table just for the requested page. This is working well and we are able to show tables that have millions of records without the need to send all the data from the server to the client. The server also has the ability to sort records and return the sorted results for only the requested page of records. I have wired up the XamGrid_ColumnSorting Event so I can use the custom sorting abilities of the server and cancel the ColumnSorting event.private void XamGrid_ColumnSorting(object sender, Infragistics.Controls.Grids.SortingCancellableEventArgs e) { (this.DataContext as MyViewModel).Execute(......); e.Cancel = true;}This works well but I need to set the “sort direction” of the column so that its sorting indicator shows up in the column but I cannot figure out how to do this without the grid perform a sort. I was able to do this with the normal WPF DataGrid. In its Sorting Event we would remember the Column and its SortDirection so that once the server was finished performing the sort, and we updated the ItemsSource of the DataGrid, we could set the SortDirection of the column in the TargetUpdated Event. Then the user could see which column was sorted and in what direction and the next time they clicked on the column to sort we knew its current sort direction. I really hope it’s possible to set the sort indicator of a column without it actually performing the sort.BTW should I be using the XamDataGrid or theXamGrid?
Hello Howard,
Here you can register your keys:
https://ko.infragistics.com/my-account/register-product
Where can i find the infragistics registration? and what happen to the history of dowloads?
Once I got to the downloads and keys it just asked me for product registration ... I was able to the video -- but its different behavior. My click does not provide an indicator
I have tested the solution with the latest service release of 11.1 (2282) and everything seems to work ok on my side, so I can suggest you download it by logging to our web site and going to Account \Keys & Downloads. I also attached a video of the behavior I have.
Hope this helps you.
When I added that check null --the sort indicator never appeared.
and the button stopped working
private void button1_Click(object sender, RoutedEventArgs e)
{
si.SortStatus =SortStatus.Ascending;
si.Visibility =Visibility.Visible;
}
I do see the the si assigned again on sort -- I see that in the debugger.
Does adding a field cause the sort indicator to be invalid?