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

RadWindow RadGrid Autosize and Filters

1 Answer 97 Views
Window
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 02 Sep 2010, 12:55 AM
I'm using a radwindow to drill into a category, showing all of the transactions behind it.  This data is in a radGrid control on the page.

The same page displays data for multiple details and binds the columns at runtime.  The code below is used to open the window and automatically resize it (hopefully) after the data has loaded into the grid.  I've run into two problems autosizing the page based off the grid contents. 

1)  The timeout value is too long for fast computers and too short for slow computers.  Is there an easy way to resize the window reliably AFTER the data has been bound to the grid?

2) When displaying the filter options for the grid columns, the filter types (lessthan, equal, etc) occasionally extend beyond the window boundaries.  Is there a way to ensure that the filter types fit within the window area (even at the expense of limiting the filtering options somewhat)?

openWindow: function(URL, title, modal) {
    var oWnd = $find('portalWindow');
    oWnd.SetUrl(URL);
    oWnd.set_title(title);
    oWnd.Show();
    setTimeout(function() { GetRadWindowManager().GetActiveWindow().autoSize(true); }, 300);
 
    oWnd.center();
    oWnd.set_modal(modal);
    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Resize);
    oWnd.set_visibleStatusbar(false);


1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 07 Sep 2010, 08:52 AM
Hello Daniel,

 Straight to your questions:


1) You can remove the timeout and to use the OnClientPageLoad event instead or simply set the AutoSize property of the RadWindow to true which will take care of the resize instead of manually calling the autoSize method.

2) I am afraid I could not completely understand your second setup - would you please prepare and attach a screenshot with the problem clearly marked?

Greetings,
Svetlina
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
Window
Asked by
Daniel
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or