All Products
Demos
Pricing
Services
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
Test Studio Forum
/
General Discussions
/
Issue with wpf datagrid and scrollintoview
Cancel
Test Studio
Resources
Buy
Try
Feed for this thread
2 posts, 0 answers
amit kumar
1 posts
Member since:
Nov 2014
Posted 27 Nov 2014
Link to this post
Hello All,
I have a requirement where I have to search for a particular type of item in the data grid and then click on it.
But when I am trying to search it in the data grid, initially I was unable to found this item as the number of rows present in the data grid found through Telerik were only the rows that were visible. This was due to the by default enabled feature of WPF virtualization. I disabled it and was able to get all the grid items.
So the first question what if I don't want to disable virtualization and want to traverse all the grid items. Any solution for this?.
The second query is when I disabled virtualization and traversed the data row items in a loop. I was trying to find the required item in this grid and when I found it I tried to click on it after scrolling to it using scrollintoview. But I was unable to click on it as after scrolling the grid was scrolled down to the bottom end.
The code is like:
foreach(DataGrid row in rows){
if(row.Text.Equals(someValue))// Comparing the row data one by one
{
row.ScrollToVisible();// Not working
row.User.Click(); // Not working
}
}
Please let me know on how to fix this one?
Regards,
Amit Singh
Boyan Boev
Admin
1072 posts
Posted 02 Dec 2014
Link to this post
Hi Amit,
Here
is a coded sample against Silverlight grid which can be used also against WPF.
It gives the necessary information about the visualization also.
Let me know if this helps.
Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Back to Top
Close