﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » IListServer implementation for DevExpress Server Mode</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 01 Jun 2026 22:15:09 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: IListServer implementation for DevExpress Server Mode</title><link>http://forum.strataframe.net/FindPost27410.aspx</link><description>Hi&lt;br&gt;
Any further info could be shared? Or any alternate way to implement server mode like LINQ to BO?&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Sat, 12 Jun 2010 11:03:38 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>IListServer implementation for DevExpress Server Mode</title><link>http://forum.strataframe.net/FindPost23818.aspx</link><description>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?&amp;nbsp; We are are generating a few really large datasets and it is taking a while to render them without having this implemented.&amp;nbsp; Thanks!</description><pubDate>Sat, 12 Jun 2010 11:03:38 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: IListServer implementation for DevExpress Server Mode</title><link>http://forum.strataframe.net/FindPost23835.aspx</link><description>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,&lt;br&gt;
&lt;br&gt;
[b]Sort Item Class (Pseudo Code) [/b]&lt;br&gt;
[codesnippet]&lt;br&gt;
Public Class MySortClass&lt;br&gt;
&lt;br&gt;
Object SortValue&lt;br&gt;
int RowIndex&lt;br&gt;
&lt;br&gt;
End Class[/codesnippet]&lt;br&gt;
&lt;br&gt;
Then you will need a collection:&lt;br&gt;
&lt;br&gt;
[b]Sort Item Collection[/b]&lt;br&gt;
&lt;br&gt;
[codesnippet]Public MySortCollection&lt;br&gt;
    Inherits System.Collections.CollectionBase&lt;br&gt;
&lt;br&gt;
'-- Within this class you will create a sort method and the IComparer is already implemented, so you just need to create an IComparer&lt;br&gt;
'    class to pass over to the sort that will support your MySortClass logic and structure&lt;br&gt;
End Class[/codesnippet]&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
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.</description><pubDate>Thu, 16 Jul 2009 07:42:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: IListServer implementation for DevExpress Server Mode</title><link>http://forum.strataframe.net/FindPost23826.aspx</link><description>They show their example using an ArrayList and sorting via an IComparer.&amp;nbsp; How would I use an IComparer with the BO DataTable?&amp;nbsp; 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.&amp;nbsp; I may be way off in how&amp;nbsp;I'm approaching this though, so if you have any advice for implementing the IComparer for a BO that would be awesome.&amp;nbsp;</description><pubDate>Wed, 15 Jul 2009 12:39:21 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: IListServer implementation for DevExpress Server Mode</title><link>http://forum.strataframe.net/FindPost23825.aspx</link><description>[quote]How do you do a sort in code for the custom property or can you???[/quote]&lt;br&gt;
&lt;br&gt;
This logic will be entirely up to how you handle the code behind the custom property.  Back to basics first, a BO.Sort uses the CurrentView.Sort property.  So the sort is ultimately handled in the ADO.NET table behind the BO.&lt;br&gt;
&lt;br&gt;
Depending on how you are sorting, then you can either force a column into the CurrentDataTable for sorting purposes, or if there is an IComparer option, you can do anything you want.  This would allow you to pull the logic out of the standard BO sort.  I don't have any first hand experience with the IListServer interface, but the IBindingList implementation may be a similar comparison in regards to the Sort implementation.  In this case, in a BBS, we rely on the sort of the BO, not recreating an internal sort. &lt;br&gt;
&lt;br&gt;
Don't know if any of this helps, but this isn't an easy to answer question because there are a lot of factors that can be involved.</description><pubDate>Wed, 15 Jul 2009 12:35:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: IListServer implementation for DevExpress Server Mode</title><link>http://forum.strataframe.net/FindPost23824.aspx</link><description>Ok, here we go...I'm getting somewhere with all of this.&amp;nbsp; Just implementing these two gets the data returning back correctly.&amp;nbsp; However, there are still a bunch of others to implement grouping, sorting, etc.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt;&lt;/FONT&gt; GetRowIndexByKey(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt; key &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;) &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Integer&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Implements&lt;/FONT&gt;&lt;/FONT&gt; DevExpress.Data.IListServer.GetRowIndexByKey&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp; Return&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.BusinessObject.CurrentView.Find(key)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT size=1&gt;Function&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt;&lt;/FONT&gt; GetRowKey(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt; index &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Integer&lt;/FONT&gt;&lt;/FONT&gt;) &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Object&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Implements&lt;/FONT&gt;&lt;/FONT&gt; DevExpress.Data.IListServer.GetRowKey&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp; Return&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.BusinessObject.CurrentDataTable.Rows(index).Item(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.BusinessObject.PrimaryKeyField)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=6&gt;&lt;FONT size=3&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT size=1&gt;Function&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=6&gt;&lt;FONT size=3&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;&lt;BR&gt;&lt;FONT color=#333333&gt;This is what I am using for sorting and it is working, but NOT for custom properties.&amp;nbsp; How do you do a sort in code for the custom property or can you???&amp;nbsp; I know the BBS handles this for you, but not sure how to do it myself.&amp;nbsp; Any suggestions?&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#333333&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt; ApplySort(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt; sortInfo &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; System.ComponentModel.ListSortDescriptionCollection, &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt; groupCount &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Integer&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt; summaryInfo &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; System.Collections.Generic.List(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Of&lt;/FONT&gt;&lt;/FONT&gt; DevExpress.Data.ListSourceSummaryItem), &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt; totalSummaryInfo &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; System.Collections.Generic.List(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Of&lt;/FONT&gt;&lt;/FONT&gt; DevExpress.Data.ListSourceSummaryItem)) &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Implements&lt;/FONT&gt;&lt;/FONT&gt; DevExpress.Data.IListServer.ApplySort&lt;BR&gt;&lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;If&lt;/FONT&gt;&lt;/FONT&gt; sortInfo &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;IsNot&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Then&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt; sortString &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;String&lt;/FONT&gt;&lt;/FONT&gt; = &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;""&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;For&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Each&lt;/FONT&gt;&lt;/FONT&gt; info &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; ListSortDescription &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;In&lt;/FONT&gt;&lt;/FONT&gt; sortInfo&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=1&gt;sortString &amp;amp;= info.PropertyDescriptor.Name &amp;amp; &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;" "&lt;/FONT&gt;&lt;/FONT&gt; &amp;amp; IIf(info.SortDirection = ListSortDirection.Ascending, &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"ASC, "&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"DESC, "&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT size=1&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.BusinessObject.Sort = sortString.TrimEnd(&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;","&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;" "&lt;/FONT&gt;&lt;/FONT&gt;)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;BR&gt;&amp;nbsp; End&lt;/FONT&gt;&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;If&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Wed, 15 Jul 2009 11:46:17 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: IListServer implementation for DevExpress Server Mode</title><link>http://forum.strataframe.net/FindPost23819.aspx</link><description>No, we don't.  But you will not want to implement this on a BO directly.  You would actually want to implement this on a Custom Binding Source or something along those lines.  If you recall, you must call the GetEnumerable() to enumerate a BO and wrap a BO with a BusinessBindingSource to achieve the IBindingList for grid binding.  So you will want to follow suite for implementing IListServer.  IListServer, if I am not mistaken, is a DevExpress implementation, not .NET.  They do this to achieve paging within their grids.  I have heard of mixed reviews of trying to implement this, but in any case, it is specific to DevExpress, thus not something that we will implement directly within the framework as this would require too low of a hook.  But I would create a custom BBS, then implement the IListServer there most likely.  I have not tried this nor have I ever tried to implement this interface, but that should be a good starting point.</description><pubDate>Tue, 14 Jul 2009 07:36:47 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>