IListServer implementation for DevExpress Server Mode


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Do you guys implement IListServer for the BOs and if not, can you point me in the right direction of how to implement this myself?  We are are generating a few really large datasets and it is taking a while to render them without having this implemented.  Thanks!
Replies
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
They show their example using an ArrayList and sorting via an IComparer.  How would I use an IComparer with the BO DataTable?  I have tried creating an ArrayList of BOs and it will sort correctly with the IComparer I have implemented, but I don't know how to get it set back to the CurrentDataTable again from the ArrayList.  I may be way off in how I'm approaching this though, so if you have any advice for implementing the IComparer for a BO that would be awesome. 
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, giving you a sample is going to require a little elbow grease, but in short, you would produce an internal sort array within your IListServer implementation. For example, you will know the field or column that needs to be sorted, so you would create a two part class and collection with a customer IComparer class that would sort and save off the row index so you know how to deal with the BO records. For example,



Sort Item Class (Pseudo Code)



Public Class MySortClass



Object SortValue

int RowIndex



End Class




Then you will need a collection:



Sort Item Collection



Public MySortCollection

Inherits System.Collections.CollectionBase



'-- Within this class you will create a sort method and the IComparer is already implemented, so you just need to create an IComparer

' class to pass over to the sort that will support your MySortClass logic and structure

End Class




Keep in mind that you will have to most likely pass over a BO at some point here as well (or at least the current row index of the value when the MySortClass item is created. But this will create a sorted collection that is in the right order. You can then either show the collection and when a collection item is selected, it updates the underlying BO row index, or re-order the BO once you know the order of the collection.



Like I said, this is not the easiest thing to just slap out an explanation for as there are a lot of factors, but these are just some possible ideas.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search