WindowsCE problem with sorting a DataGrid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alberto

    WindowsCE problem with sorting a DataGrid

    I create a DataTable dataTable. Then a BindingSource bindingSource =
    new BindingSource(d ataTable, "")

    Then: dataGrid.DataSo urce = bindingSource.

    All works nicely, navigating the dataGrid changes the
    bindingSource.P osition etc.

    Then I tried sorting: bindingSource.S ort = "aColumnNam e ASC". This
    has the effect of sorting the dataGrid just as expected.

    But now when I change cells in the dataGrid, if the DataTable has more
    than 3 records, all sorts of nasty things happen, like X marked
    cells, exceptions (null reference and other) etc.
    Testing for bindingSource.S upportsSorting gives true by the way.
    I use WindowsCE 5.0, Visual Studio 2005
    Any ideas why these thing happens?
    Alberto

Working...