Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

GridView - How to automatically resize the grid to 100% width and height when it is placed inside a resizable PopupControl

$
0
0

This example illustrates how to set the grid's width and height to 100% when it is placed inside a resizable container. The How to use the GridView extension in a Full Screen mode (100% browser Width and Height) example describes how to accomplish this task when the grid is paced into the page directly. If the grid is placed inside some container, it is necessary to handle container resizing to set the grid height:

[C#]
settings.ClientSideEvents.AfterResizing="function(s, e){ GridView.SetHeight(document.getElementById('containerDiv').clientHeight); }";

 GridView is placed inside the div element with height and width equal to 100% to get the client height of the container's content area:

[C#]
ViewContext.Writer.Write("<div id='containerDiv' style='height:100%; widht:100%'>");Html.RenderAction("GridViewPartial");ViewContext.Writer.Write("</div>");

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>