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

[Solved] change Radgrid Size dynamically

2 Answers 276 Views
Grid
This is a migrated thread and some comments may be shown as answers.
maha raja
Top achievements
Rank 1
maha raja asked on 29 Aug 2009, 05:37 AM
Hi,

Have a smiley days...

I want to change dynamically the height of the grid depend on the number of rows in the grid.

thanks in advance..

Regards,
Maha

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Aug 2009, 06:32 AM
Hi Maha,

I am not quite sure about your requirement. I have found radgrid is automatically resizing the height according to the number of items. You can try the following code if you want to set the height from code behind.

C#:
 
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    RadGrid1.Height = Unit.Pixel(500); 
Could you explain your scenario that you are trying if this does not help?

-Shinu.
0
maha raja
Top achievements
Rank 1
answered on 29 Aug 2009, 06:45 AM
Hi,

Thanks for ur suggestion..

But it will set size default as 500, when ever 'added row' or 'remove row' or 'no record found'.

I need to increase and decrease radgrid height depends on radgrid records.

Have a smiley day...

Regards
maha;-)



Tags
Grid
Asked by
maha raja
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
maha raja
Top achievements
Rank 1
Share this question
or