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

resizing grid on client

3 Answers 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 10 Nov 2011, 06:58 PM
I have a grid in a splitter pane. The splitter has width/height 100%. The grid has height/width set to 100%. The mastertableview has width="100%" and TableLayout="Fixed". In Firefox, everything works fine. The grid occupies 100% of the avalable space (vertically and horizontally and scrollbars are displayed if the grd content is too wide/tall. However, in IE 7, I have noticed the horizontal scrollbar is not shown and the vertical scrollbar is not visible because it is toof far off to the right. I added some code in the page load which checks for IE 7 and sets the grid width to 97% and this seems to work. However, 97% is only appropriate for a given screen size. For smaller screens, 97% would not be small enough to display the scrollbars, I would need to set it to something like 95%. So, its hard to get things to look right across different screen sizes. Is there a way to "resize" the grid on the client in an appropriate fashion when the page loads. I imagine this would include calculatig the width real-time of the splitter pane and setting the grid width accordingly. Can someone help me with this? Remember, I only want to do this if the browser is IE7/8.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 11 Nov 2011, 10:22 AM
Hi Albert Shenker,

Here is a code library example, which demonstrates different ways to set height to RadGrid on the client:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/how-to-set-radgrid-height-client-side-with-javascript.aspx

Best wishes,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 11 Nov 2011, 02:03 PM
I don't have a problem with the grid height. I have a problem with the grid width, and its only in IE. Also, I'm not concerned with how to set the height/width of the grid client-side (that's clear from documentation), What I neede help with is how to CALCULATE the width the grid should be based on the rad pane it is in, particularly since the pane/splitter occupy 100% width.
0
Pavlina
Telerik team
answered on 16 Nov 2011, 04:31 PM
Hi Albert,

If the problem persists, you may consider opening a regular support ticket and providing a sample project for us, where we can try to reproduce the described issue and provide a solution.

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Pavlina
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Share this question
or