8 Answers, 1 is accepted
0
Hello Adiel,
You can use our extension methods to achieve this:
var count = RadGridView1.ChildrenOfType<GridViewRow>().Count;
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can use our extension methods to achieve this:
var count = RadGridView1.ChildrenOfType<GridViewRow>().Count;
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adiel
Top achievements
Rank 2
answered on 08 Jun 2009, 08:59 AM
Hi
Great extensions!
Anyway In this way I had to try large amount of rows and then reduce page size.
I'm looking for way to calculate it from beginning. (base on Actual height?)
Any ideas?
Thanks
Adiel
Great extensions!
Anyway In this way I had to try large amount of rows and then reduce page size.
I'm looking for way to calculate it from beginning. (base on Actual height?)
Any ideas?
Thanks
Adiel
0
Hello Adiel,
You cannot know the ActualHeight before the row is loaded. The only way to know the Height before row loaded is to set RowStyle on RadGridView and the set the Height to some value.
I hope this helps.
Regards,
Hristo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You cannot know the ActualHeight before the row is loaded. The only way to know the Height before row loaded is to set RowStyle on RadGridView and the set the Height to some value.
I hope this helps.
Regards,
Hristo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Marc Roussel
Top achievements
Rank 2
answered on 18 Dec 2009, 04:12 PM
Is there something I don't understand here ?
the count reports me 4 rows but I have only 3 in the gridview !
If I'm right, is this the same thing as RadGridView.Items.Count ?
the count reports me 4 rows but I have only 3 in the gridview !
If I'm right, is this the same thing as RadGridView.Items.Count ?
0
Hello Marc Rousel,
One of the them is the invisible GridViewNewRow which also inherits from GridViewRow.
All the best,
Ross
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
One of the them is the invisible GridViewNewRow which also inherits from GridViewRow.
All the best,
Ross
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marc Roussel
Top achievements
Rank 2
answered on 18 Dec 2009, 04:23 PM
Thank you for the information.
By the way my name is with 2 s Roussel
So based on this, when I have to iterate the rows, I should use .Count - 2 to take into account the newrow which I presume
is the last one !
By the way my name is with 2 s Roussel
So based on this, when I have to iterate the rows, I should use .Count - 2 to take into account the newrow which I presume
is the last one !
0
Hi Marc Rousel,
It is better if you check whether the row is GridViewNewRow while iterating and if it is -- then do not do the thing you are doing.
As for the name, this is the way it is entered in your profile. You can edit your profile if you want to change your name.
Best wishes,
Ross
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
It is better if you check whether the row is GridViewNewRow while iterating and if it is -- then do not do the thing you are doing.
As for the name, this is the way it is entered in your profile. You can edit your profile if you want to change your name.
Best wishes,
Ross
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marc Roussel
Top achievements
Rank 2
answered on 18 Dec 2009, 04:36 PM
Thanx.