View previous topic :: View next topic |
Author |
Message |
amsimmon
Joined: 31 Mar 2006 Posts: 13
|
Posted: Wed May 17, 2006 6:12 pm Post subject: Edit of sort field causes data |
|
|
I'm using the editor functionality to edit a simple grid. I have it sorted on the display order column:
If I enter a larger number in the display order cell of the first row(e.g. 4), when I leave the cell to save the value, the grid stores the 4 and resorts, switching the order of the rows. The problem is, the value 4 is displayed as the display order value for both rows. It's a refresh issue because if you click on the first row display order cell to edit it, it changes back to 3.
Is this a bug or is there a way I can make it refresh correctly after the edit? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed May 17, 2006 10:49 pm Post subject: |
|
|
What version of Virtual Tree are you using? Are you using Data Set binding, Object Binding or programmatic? I've just checked the Data Set Browser sample project and it does not exhibit this behaviour. If you can possibly email a sample project that exhibits the problem to support@infralution.com that would help track it down. _________________ Infralution Support |
|
Back to top |
|
|
amsimmon
Joined: 31 Mar 2006 Posts: 13
|
Posted: Thu May 18, 2006 12:41 am Post subject: |
|
|
I had 2.5.2. I just downloaded and installed the latest version 2.5.3 to make sure it wasn't fixed in that last patch. The problem is exhibited by the Data Set Browser sample project.
To recreate:
1) Sort ascending by postal code.
2) The second entry will be 01-012. The third will be 01307. Change the third to 01-011.
3) Both the second and third entries will now display 01-011.
Let me know if you can see it now. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu May 18, 2006 6:04 am Post subject: |
|
|
I followed you instructions but still did not get the problem behaviour - then I realized it may be a VS2005 thing. Sure enough when I run the 2005 sample of this I can replicate the behaviour. My guess is that it is related to changes Microsoft made to the behaviour of Datasets in .NET 2.0
We'll take a look at this and try to get a fix out ASAP. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri May 19, 2006 9:19 am Post subject: |
|
|
We've now tracked down the source of this problem. It is indeed related to changes Microsoft made in .NET 2.0 to the DataRowView class. In .NET 1.1 a DataRowView object was instrinsically bound to its underlying DataRow object. In .NET 2.0 the DataRow associated with a DataRowView object can and does change when the sort order of the DataView changes. This means that, since Virtual Tree currently binds to the DataRowView object, the tree is unable to correctly locate rows following a change in sort order. Another symptom of this that if you select a row and click on a column header to change the sort order, in .NET 1.1 the selected row remained the same (hence changed position), in .NET 2.0 the position of the selected row remains unchanged but the underlying row selected changes.
We will be releasing a fix for this on Monday (22 May). This will change Virtual Tree to bind to the underlying DataRow rather than the DataRowView. This will have some impact on application code that does things like processing selections (since now the application will deal with DataRow objects rather than DataRowView objects). In general the change should actually make application usage somewhat simpler. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon May 22, 2006 12:02 am Post subject: |
|
|
Version 2.5.4 has now been released which fixes this issue. Note that in this version the object being bound (when binding to Data Set data) is now a DataRow (previously it was a DataRowView). This may mean that yoiu need to change application code when dealing with selected items. _________________ Infralution Support |
|
Back to top |
|
|
|