Hello again,
We have the following issue. We want to perform an action when a user Doubleclicks a row. To achieve this we have implemented the Mousedoubleclick event to get the Activerecord. Unfortunately when we have so many records that a scrollbar appears and the user selects the last displayed record(the one at the bottom) the grid automatically scrolls down and brings the following 2 records into view.
I believe this is an intended feature of the grid. Unfortunately doubleclick on the last records results into an unwanted behaviour. The following happens. In the split second between the first and second click the grid scrolls up and the last record and activerecord change to the now visible row and our doubleclick event fires for a record the user did not intend to select.
Is there any way to prevent this automatic scrolling?
Regards
stef
Stef,
I have confirmation from the development team that this is an issue. I am going to create a support case on your behalf so that you will be notified when the Service Release is out.
On my way of isolating the problem, I found out that the SelectionTypeRecord property set to Single is causing this issue. I am going to bring that up to the development team to check if that is a possible issue:
SelectionTypeRecord="Single"
As a way around this, you can set the SelectionTypeRecord property to something else than Single, or if the record selection has to be single handle the SelectedItemsChanging event and cancel it if you have already selected one.
I will followup here as soon as I have information from the development team.
I have atached an example demonstrating the behavior.It's definitly depends on th Grid's heigt.On the second grid i have set a margin that minimize the total height of the grid.If you click at the second grid on the last row in view,the grid scrolls automatically to the next row.
On double click the wrong record is selected.Calculating the right Grid's height depending on the DataRecordPresenter's height isnot so easy, because other rows for example Recordfilter have to be considered too.Please suggest any solution or workaround for this behavior.
Hello Stef,
If I am not mistaken, I have seen this elsewhere, but it is really hard to reproduce - when select on the last visible record and it is not completely visible, the grid scrolls down two records instead of one.
If you have a sample that reproduces this, it would be really great so that we can look into it and probably submit it as an issue.
One quick suggestion for now would be to adjust the XamDataGrid's height (in respect to the DataRecordPresenter's height) dynamically when it loads so that the records in view are completely visible.