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
|
What is the first parameter of BringRowIntoView(object row) ? I tried passing the ViewModel of the row, but it doesn't seem to work Thanks! |
|
|
Hello Nestor You are correct that the ViewModel of the row is the expected parameter of this method. Not sure why this is not working for you though. What type of items source are you using? (DataTable, DataView or IEnumerable of some kind). Are you trying to bring a row into view that is on a different page of the DataGrid? When you call this method, does the viewport move at all? or does nothing happen at all? A repro project would help a lot to resolve this issue. You can send it to jason@mindscape.co.nz if you can't attach one to the forum. Jason Fauchelle |
|
|
OK. Here is my conclusion after looking at this again: 1) BringRowIntoView only works for me if I do it inside a BeginInvoke:
2) It does not work for child rows, only for top rows, which is a pity. |
|
|
Hello Nestor Do you have the latest nightly build? A similar issue to this was resolved a little while ago that should prevent you from needing the dispatcher. Let me know if this is still an issue for you with the latest nightly. Jason Fauchelle |
|
|
Yes. I was following that thread. I'm currently using the nightly build 11/29/2012. |
|
|
Hello Nestor I have not been able to reproduce these issues at my end. In what scenario are you calling this method that causes it to fail? Are you calling this method just after a child item has been added for example. A repro project would greatly help to track down this bug. Jason Fauchelle |
|
|
I also can reproduce it, the conditions are: 1) when the ItemsSource is DataTable or DataView, 2) when there is more records than it can show, say total is hundred records 3) you want to set the first row as selected row by code, it only show 2nd row and after. Gordon |
|
|
Nestor - In the next nightly build the BringRowIntoView method will work correctly for child items. I have not been able to reproduce the issue that requires the dispatcher though, so more info will help debug this, unless you don't mind sticking with the dispatcher. Gordon - I have not been able to reproduce your exact scenario. If this is still a problem for you after the next nightly build, let me know more details to reproduce such is if you're using hierarchical data or send a repro project. Jason Fauchelle |
|
|
Yes. The child problem is fixed. Thank you! |
|