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

Cant Retrieve all rows when using scroll bar.

1 Answer 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kaustubh Wadi
Top achievements
Rank 1
Kaustubh Wadi asked on 28 Jul 2010, 01:54 PM
Hello Telerik Team,
         I am using Telerik Silverlight RadGridView in my application. I am facing a strange issue while retrieving all rows from that grid view.
I want to traverse through the grid view and want to store every row's cell 0's  all contents in an array. For that my approach is as follows:
var gridViewRows = gridview.ChildrenOfType<GridViewRow>();
           for (int i = 0; i < gridview.Items.Count; i++)
           {
               arr[i]=gridViewRows[i].Item.ToString(); 
           }

  But when i am executing my application, gridview.Items.Count returns me 20 whereas count of gridViewRows returns 14 which should be also 20 as there are 20 rows in grid view.

I had noticed following thing:
     I am using radgridview with vertical scroll bar. If 14 rows are visible then  gridViewRows returns 14 count. When i decreased the height of grid view and whene there are 10 rows are visible then gridViewRows returns 10 count.

Why it is not returning me the correct count of rows? Is there any property of grid view scroll bar that i have to set?

Waiting for your valuable response.

Regards,
Kaustubh.

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 28 Jul 2010, 03:19 PM
Hello,

This is normal behavior due to the grid virtualization. I would not recommend you,but still If you want to turn off the virtualization you can set EnableRowVirtualization property to False.

All the best,
Vanya Pavlova
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
Tags
GridView
Asked by
Kaustubh Wadi
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or