Hi,
I'm using a BindingSource with the WinTree.
The bindingsource is bound to a datatable and the wintree is bound to the bindingsource.
The problem is, once one of the columns is sorted in the wintree it uses its own sorting mechanism instead of sorting the underlying dataview and therefore the bindingsource is out of sync with the wintree.
Is there a way to tell the wintree to directly sort the underlying datasource so it will remain in sync with the bindingsource ?
thanks.
Hello Kal,
I am just checking about the progress of this issue. Let me know if you need my further assistance on it.
Thank you for using Infragistics Components.
Well, displaying the indicator would be a matter of using a DrawFilter or CreationFilter to draw it yourself. Or another option would be to simply use the HeaderAppearance on the column and apply an Image - assuming you are not already using the image for something else.
You would also have to store the sorted state of the column somewhere - maybe in the column's Tag property. Then, of course, you would have to handle the clicks on the column headers to allow the user to change the sorting.
I must use the wintree control.
if I take care of the sorting, how can I display the sortindicator in the column header ?
Hi Kal,
This would be very tricky. In theory, you might be able to trap for when the sorting in the tree changes and then attempt to sort your data set using the same criteria. But in the case where there are duplicate values and the order of two nodes/rows is arbitrary, you might not be able to get it exactly the same in all cases.
The WinGrid has a feature we call External sorting. That is, the grid shows the sort indicates in the column headers and they respond to user action, but the grid doesn't actually sort anything. It simply fires event and allow you to sort your data source and then refresh the grid display. So that way the grid sorting is in synch with the data source. But there is no such feature in the WinTree at this time.
So you might want to consider using a WinGrid if this feature is important to your application.
yes, I want the dataview itself to be sorted. what happens, once you sort the wintree, when using the bindingnavigator, the order of the records in the bindingsource aren't in the same order as in the wintree.
any solution ?
thanks in advance.