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

[Solved] Hide RadGrid until Ajax events are done?

1 Answer 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 27 Aug 2009, 05:14 PM
I am trying to determine a way of hiding my RadGrid until all of the client-side ajax events I am handling are done.  Then show the grid.

Is this possible?

Perhaps I am going about this in a more difficult manner than is needed or perhaps I am accessing the grid in the wrong event but I am trying to accomplish the following:

-Determine the height of a pane when a window is loaded. 
-Based on that pane height, set the grid's PageSize property. 
-I need to capture the pane's height prior to the grid loading so that I can set the pagesize property before this is printed to the screen.

The problem is that the Grid is displayed with the defaults prior to me getting access to the MasterTableView to get or set the pageSize property.

R

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 Aug 2009, 12:55 PM
Hi Robert,

I suppose you need the following functionality:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=grid

The above example lacks one feature though - RadGrid is initially displayed with its default page size of 10. If you want to adjust the page size on initial load as well (which I don't recommend, as it will be an overhead), you can ajaxify the RadGrid and use a RadAjaxLoadingPanel with no transparency (EnableSkinTransparency="false" and Transparency not set). This will hide the RadGrid control while its page size is being changed. However, your will still see the RadGrid control with its initial page size. To prevent this, you can experiment with setting VisibleDuringInit="false" for the RadSplitter and/or using an absolutely positioned element to overlay the grid control, while its page size is being adjusted.

Instead of calculating the pane's height initially, you can set some default height and adjust the initial RadGrid page size accordingly.

Regards,
Dimo
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.
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or