This project is read-only.

Patch for Datatable using...

Oct 8, 2007 at 10:28 AM
Have you seen my Patch wich I have uploaded to use a Datatable to fill your list!

Is there a chang that it goes into your version?
Oct 15, 2007 at 3:41 PM

Have you looked at my ClickAndQuery example? I didn't need to add a column parameter to achieve a similar thing. The code is in ResultsControl.cs.
Nov 19, 2008 at 3:12 AM
Disculpas, No soy bueno escribiendo en ingles.
Mi pregunta es, donde puedo obtener el codigo  "The code is in ResultsControl.cs"

Mil gracias, y es un excelente control.
Nov 25, 2008 at 2:54 PM
Where can I find the ClickAndQuery example? I used the implementation proposed by Daniel_Medina on the CodeProject website

This involves one new class DataRowColumn and two minor additions to existing classes.
Add the using directive System.Data to the class ListControl and add the following lines of code:
#region Datatable methods
public void FillList(DataTable table)
    if (table != null)

public void FillColumns(DataTable table)
    if (table != null)
        foreach (DataColumn col in table.Columns)
            DataRowColumn guiCol = new DataRowColumn(col.ColumnName, col.ColumnName, 120, null, col.Ordinal);

The function public int Compare(object x, object y) in the class ColumnComparer in the file BufferedItemList.cs needs some extra lines of code, just before the end:
//NEW PART            
            if (x is DataRow)
                    DataRow dx = x as DataRow;
                    DataRow dy = y as DataRow;
                    return ((IComparable)dx[0]).CompareTo(dy);
                    return 1;
            if (_list.ObjectComparer == null)
                throw new InvalidOperationException("ItemList.ObjectComparer must be set");

Isn't this something to consider adding to the project to make the SuperList control even more usefull?
Nov 25, 2008 at 9:40 PM
Hi it should be under the Examples folder.