This is a migrated thread and some comments may be shown as answers.

Retrieve actual count of items of the RadGridView

3 Answers 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adi
Top achievements
Rank 1
Adi asked on 19 Oct 2010, 05:54 PM
Hi All,

I am new to WebUI Studio and any help would be highly appreciated. I am doing kind of a verification wherein I compare the no of items in Silverlight telerik RadGridView to the actual count (which obviously is predetermined). However, when I try to use the webUI widget  verify count, the count seems to reflect only the no. of rows which fit in the grid at that time (I believe due to underlying virtualization). It would be of great help, if someone could suggest a work around to get the actual count of no. of items rather than just the no. of rows that fit in radgridview.

Thanks,
Adi

3 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 21 Oct 2010, 03:21 PM
Hello Adi,

The UI virtualization in RadGridView is turned on by default. This means that only the visible rows in the viewport are created. Therefore, Row count verification returns the items in the viewport. Currently, we are working on improving the behavior when working with virtualized rows but we cannot commit to any specific date when this will be addressed.
As a temporary workaround, you can try to turn off vertical virtualization (EnableRowVirtualization="False") in case your scenario allows. In this way Row count verification will return all items count.

All the best,

Yordanka
the Telerik team

 

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bala
Top achievements
Rank 1
answered on 28 Sep 2011, 08:19 AM
Yordanka ,

Here we dont have previliges to change the gridview properties.is it possible to disable this property EnableRowVirtualization="False" through visual studio plugin after recoding the action.
 

RadGridView grid = Pages.Test.SilverlightApp.RadGridView;
IList<GridViewRow> rows = grid.Find.AllByType<GridViewRow>();

here we are getting the rows of current page in grid.

Regards,
Bala
0
Stoich
Telerik team
answered on 03 Oct 2011, 10:09 AM
Hi Bala,
    Test Studio will not be able to change the Property of the GridView. The only way to change the properties of the GridView is by implementing the changes directly in your Silverlight project and then rebuilding and deploying it.

You can try getting the count for the first page and storing it in a variable. Then invoking an action that will move the browser to the next page. Now you can get the count for this page and add it to the count from the previous page etc.

All the best,
Stoich
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Adi
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Bala
Top achievements
Rank 1
Stoich
Telerik team
Share this question
or