L
Laura Stern
Guest
Yes, I'm not surprised that it's slow since the control will keep asking for data from the BindingSource to do the sort. It has to read at least every single row once, but to do the sorting algorithm, it generally accesses many of the the same records over and over. In general, the best way is to subscribe to the BindingSource's SortRequest event (I think that's the name - not in the office to look it up). Then in your event handler you can reconfigure the query by adding in a BY clause on the sort column. The info to use is available in the event arguments. Then just reopen the query based on the new sort order. What I don't know is how this interacts with the Telerik control. You need to basically turn off the automatic sorting that the control does to do this instead. And maybe there's a control event that you would use instead of the BindingSource's to know when to do the sorting and what column to use. Hope this at least points you in the right direction.
Continue reading...
Continue reading...