DataGridView: Sorting does not work

0
0

Hi,

since my update from Wisej 2.1.x.x to 2.2.9.0 automatic sorting by clicking on a header column seems not working.

Unfortunately I do not exactly know from which Wisej version this does not work anymore … but it has worked in all forms of my application so far and I have not made any changes within my code.

Best regards,

Harald

  • You must to post comments
0
0

Thank you for the sample. It doesn’t work in Winform but it did work in previous builds of Wisej (prior to 2.1.88). It was changed in relation to this issue https://wisej.com/support/question/datagridview-and-sorting

Sorting a data-bound grid when the data source doesn’t support sorting is disabled in winforms. In Wisej it was done only if the data source was an IList and it obviously swapped the rows in the data source. I will log this as a regression.

  • You must to post comments
0
0

Here is a simple Form, sorting by clicking the header columns worked well in previous wisej-versions but not in the current …

The code includes also a function “void Working()” that shows how it should look like, for this you have to call the function “void Working()” instead of “void NotWorking()” within the constructor of the form.

 

 

Attachment
  • You must to post comments
0
0

Cannot reproduce with 2.2.14. Please attach a small test case.

  • You must to post comments
0
0

this bug still is not fixed until 2.2.14 (newest version)

  • You must to post comments
0
0

unfortunately the sorting does not work in version 2.2.11 🙁

  • Frank (ITG)
    Hi Harald, please use 2.2.12, 2.2.11 had a deployment problem. Sorry, Frank
  • Harald Zimmerer
    the same problem with 2.2.12
  • Harald Zimmerer
    the same problem with 2.2.13
  • You must to post comments
0
0

It’s fixed internally. We’ll update 2.2 tomorrow. The build also used a wrong revision.

  • You must to post comments
0
0

It’s fixed internally. We’ll update 2.2 tomorrow. The build also used a wrong revision.

  • You must to post comments
0
0

bs.DataSource = typeof(VM);

Is the definition of the data source. But when you populate the grid you must assign the actual data source to bs.DataSource. What kind of data source is it? DataTable, custom list, array?

  • Harald Zimmerer
    typically we use “bs.DataSource..Add()” several times
  • You must to post comments
0
0

the binding is like:

public class VM { int Id; … }

Wisej.Web.BindingSource bs = …;

bs.DataSource = typeof(VM);
dataGridViewTable.DataSource = bs;

 

  • You must to post comments
0
0

There has been a fix/change related to this issue: https://wisej.com/support/question/datagridview-and-sorting

Is your DGV data bound and if yes, what is the data source type?

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.