This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
HI Jason, This is really emergency situation since we need to release our products at the end of May. Please help as soon as possible. I have reproducing project for you for the problem. 1) Unzip the attached project 2) Run the application 3) Click on Table Filter button 4)Scroll to the last record and change the Name column and change value from "Ireland" to "Canada" 5) right away click on Apply Filter button, 2 records remaining, 6) don't click on anywhere else but directly click on the row header (any one of the record) 7) Crash happens "{"Specified argument was out of the range of valid values. Parameter name: Index is 2, Collection size is 2"}" I think the function may have problem in the code: SelectionRangeUtils.GetSelectionUpdateInfo(_mouseDownRowIndex, _previousSelectionDragRowIndex, mouseOverRowIndex); We were trying to avoid in our end, but we cannot do much about it (I spent more than a day to solve it). We are using April 20, 2016 nightly build. Please get back to us asap. If you fix it, could you tell us what do you change to fix them? Thanks a lot, Gordon |
|
|
Hi Gordon, The best solution I've found is to change the line you mentioned to include index adjustments:
mouseOverRow index is fine as it's obtained within the method at a time that the collection has been filtered. The other 2 variables are determined when the mouse is pressed on the row. In your case this happens when clicking the row to edit the value. After filtering, and then clicking the row again, those 2 values will get updated, but first a call to the .NET CaptureMouse method is made. It turns out that this call can result in the mouse-move event being raised which means the event handler in the DataGrid is called while those 2 variables are still set from the previous row click - which is the problem. My solution is to allow this flow to occur, but prevent any errors from occurring. Immediately afterwards, those 2 values will be updated correctly, and actually moving the mouse will also behave as normal. Try it out and let me know how it goes. -Jason Fauchelle |
|
|
Hi Jason, I made the changes to the 3 calls on function SelectionRangeUtils.GetSelectionUpdateInfo() On file DataGrid.cs at line number 2337, 2406 and 2434. It seemed fix the problem. Could you make changes and put them in the next nightly build? (May 20, 2016 nightly build did not contain the changes) Thanks, Gordon |
|
|
Hi Gordon, Certainly, I've made those changes which will be available in the next nightly build. -Jason Fauchelle |
|