Posted 8 May 2018, 2:19 am EST
How can I make the FPS Grid responsive - so that it adjusts to different size of screen (mobile phone, tablet or large screen)?
Forums Home / Spread / Spread for ASP.NET (Web Forms)
Posted by: mmeghani on 8 May 2018, 2:19 am EST
Posted 8 May 2018, 2:19 am EST
How can I make the FPS Grid responsive - so that it adjusts to different size of screen (mobile phone, tablet or large screen)?
Posted 8 May 2018, 11:04 pm EST
Hello,
The outer Div of Spread for ASP.NET can be made responsive with "viewport’ meta tag. Since it is a server side control, the content with in the Spread(cells/rows/columns/text etc) does not show responsiveness.
The code to make the Spread control responsive as per device, you can use the code as follows:
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
#FpSpread1 {
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="#A0A0A0" BorderStyle="Solid" BorderWidth="1px" Height="200" Width="400">
<commandbar backcolor="#F6F6F6" buttonfacecolor="Control" buttonhighlightcolor="ControlLightLight" buttonshadowcolor="ControlDark">
</commandbar>
<sheets>
<FarPoint:SheetView SheetName="Sheet1">
</FarPoint:SheetView>
</sheets>
</FarPoint:FpSpread>
</div>
</form>
</body>
</html>
I hope it helps.
Thanks,Deepak Sharma