Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Sortable: Restrict Column Height
    primarykey
    data
    text
    <p>As in the example <a href="http://jqueryui.com/sortable/#portlets" rel="nofollow noreferrer">here</a>, I want the columns in my design to be limited to only 2 elements or a height of 810px. Here is my code:</p> <pre class="lang-js prettyprint-override"><code>$(".column").sortable({ connectWith: ".column", start: function (e, ui) { ui.placeholder.height(ui.item.height()); } }); </code></pre> <p>Here is my HTML (ASP) which accounts for the panels which are supposed to be aligned in a 2x2 grid with each switching places as desired:</p> <pre class="lang-cs prettyprint-override"><code>&lt;div id="charts"&gt; &lt;div class="column"&gt; &lt;asp:Panel ID="Panel1" runat="server" Height="405px" Width="450px"&gt; &lt;div id="column" class="chart"&gt; &lt;div class="download-image"&gt; &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt; &lt;asp:ListItem Text="PNG" Value="png" Selected="true"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="PDF" Value="pdf"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;asp:Button ID="Button1" runat="server" Text="Download Image" OnClick="DownloadColumnChart" OnClientClick="getSvgContent(this, 'RadHtmlChart1'); return false;" /&gt; &lt;/div&gt; &lt;telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" DataSourceID="SqlDataSource_TotalSales"&gt; &lt;PlotArea&gt; &lt;Series&gt; &lt;telerik:ColumnSeries DataFieldY="TotalSales"&gt; &lt;LabelsAppearance DataFormatString="{0:C}" Visible="false" /&gt; &lt;TooltipsAppearance DataFormatString="{0:C}" /&gt; &lt;/telerik:ColumnSeries&gt; &lt;/Series&gt; &lt;XAxis DataLabelsField="SubmitDate" MajorTickType="Outside" Step="1" MinorTickType="None"&gt; &lt;MinorGridLines Visible="false" /&gt; &lt;MajorGridLines Visible="false" /&gt; &lt;LabelsAppearance RotationAngle="-70" DataFormatString="{0}"&gt; &lt;/LabelsAppearance&gt; &lt;/XAxis&gt; &lt;YAxis&gt; &lt;LabelsAppearance DataFormatString="${0}"&gt; &lt;/LabelsAppearance&gt; &lt;/YAxis&gt; &lt;/PlotArea&gt; &lt;Legend&gt; &lt;Appearance Visible="false"&gt; &lt;/Appearance&gt; &lt;/Legend&gt; &lt;/telerik:RadHtmlChart&gt; &lt;/div&gt; &lt;/asp:Panel&gt; &lt;asp:Panel ID="Panel3" runat="server" Height="405px" Width="450px"&gt; &lt;div id="bar" class="chart"&gt; &lt;div class="download-image"&gt; &lt;asp:DropDownList ID="DropDownList3" runat="server"&gt; &lt;asp:ListItem Text="PNG" Value="png" Selected="true"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="PDF" Value="pdf"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;asp:Button ID="Button3" runat="server" Text="Download Image" OnClick="DownloadBarChart" OnClientClick="getSvgContent(this, 'RadHtmlChart3'); return false;" /&gt; &lt;/div&gt; &lt;telerik:RadHtmlChart ID="RadHtmlChart3" runat="server" DataSourceID="SqlDataSource_TotalSales"&gt; &lt;PlotArea&gt; &lt;Series&gt; &lt;telerik:BarSeries DataFieldY="TotalSales"&gt; &lt;LabelsAppearance DataFormatString="{0:C}" Visible="false" /&gt; &lt;TooltipsAppearance DataFormatString="{0:C}" /&gt; &lt;/telerik:BarSeries&gt; &lt;/Series&gt; &lt;XAxis DataLabelsField="SubmitDate" MajorTickType="None" MinorTickType="None"&gt; &lt;MinorGridLines Visible="false" /&gt; &lt;MajorGridLines Visible="false" /&gt; &lt;LabelsAppearance RotationAngle="0" DataFormatString="{0}"&gt; &lt;/LabelsAppearance&gt; &lt;/XAxis&gt; &lt;YAxis&gt; &lt;LabelsAppearance DataFormatString="${0}"&gt; &lt;/LabelsAppearance&gt; &lt;/YAxis&gt; &lt;/PlotArea&gt; &lt;Legend&gt; &lt;Appearance Visible="false"&gt; &lt;/Appearance&gt; &lt;/Legend&gt; &lt;/telerik:RadHtmlChart&gt; &lt;/div&gt; &lt;/asp:Panel&gt; &lt;/div&gt; &lt;div class="column"&gt; &lt;asp:Panel ID="Panel2" runat="server" Height="405px" Width="450px"&gt; &lt;div id="pie" class="chart"&gt; &lt;div class="download-image"&gt; &lt;asp:DropDownList ID="DropDownList2" runat="server"&gt; &lt;asp:ListItem Text="PNG" Value="png" Selected="true"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="PDF" Value="pdf"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;asp:Button ID="Button2" runat="server" Text="Download Image" OnClick="DownloadPieChart" OnClientClick="getSvgContent(this, 'RadHtmlChart2'); return false;" /&gt; &lt;/div&gt; &lt;telerik:RadHtmlChart ID="RadHtmlChart2" runat="server" Transitions="true" DataSourceID="SqlDataSource_TotalSales"&gt; &lt;PlotArea&gt; &lt;Series&gt; &lt;telerik:PieSeries DataFieldY="TotalSales" StartAngle="90"&gt; &lt;LabelsAppearance ClientTemplate="#=dataItem.SubmitDate#" Position="Circle" DataFormatString="{0:C}"&gt; &lt;/LabelsAppearance&gt; &lt;TooltipsAppearance DataFormatString="{0:C}" /&gt; &lt;/telerik:PieSeries&gt; &lt;/Series&gt; &lt;XAxis DataLabelsField="SubmitDate" Visible="true"&gt; &lt;/XAxis&gt; &lt;YAxis&gt; &lt;LabelsAppearance DataFormatString="{0:C}"&gt; &lt;/LabelsAppearance&gt; &lt;/YAxis&gt; &lt;/PlotArea&gt; &lt;Legend&gt; &lt;Appearance Visible="false"&gt; &lt;/Appearance&gt; &lt;/Legend&gt; &lt;/telerik:RadHtmlChart&gt; &lt;/div&gt; &lt;/asp:Panel&gt; &lt;asp:Panel ID="Panel4" runat="server" Height="405px" Width="450px"&gt; &lt;div id="line" class="chart"&gt; &lt;div class="download-image"&gt; &lt;asp:DropDownList ID="DropDownList4" runat="server"&gt; &lt;asp:ListItem Text="PNG" Value="png" Selected="true"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="PDF" Value="pdf"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;asp:Button ID="Button4" runat="server" Text="Download Image" OnClick="DownloadLineChart" OnClientClick="getSvgContent(this, 'RadHtmlChart4'); return false;" /&gt; &lt;/div&gt; &lt;telerik:RadHtmlChart ID="RadHtmlChart4" runat="server" DataSourceID="SqlDataSource_TotalSales"&gt; &lt;PlotArea&gt; &lt;Series&gt; &lt;telerik:LineSeries DataFieldY="TotalSales"&gt; &lt;LabelsAppearance DataFormatString="{0:C}" Visible="false" /&gt; &lt;TooltipsAppearance DataFormatString="{0:C}" /&gt; &lt;/telerik:LineSeries&gt; &lt;/Series&gt; &lt;XAxis DataLabelsField="SubmitDate" MajorTickType="Outside" MinorTickType="None"&gt; &lt;MinorGridLines Visible="false" /&gt; &lt;MajorGridLines Visible="false" /&gt; &lt;LabelsAppearance RotationAngle="-70" DataFormatString="{0}"&gt; &lt;/LabelsAppearance&gt; &lt;/XAxis&gt; &lt;YAxis&gt; &lt;LabelsAppearance DataFormatString="${0}"&gt; &lt;/LabelsAppearance&gt; &lt;/YAxis&gt; &lt;/PlotArea&gt; &lt;Legend&gt; &lt;Appearance Visible="false"&gt; &lt;/Appearance&gt; &lt;/Legend&gt; &lt;/telerik:RadHtmlChart&gt; &lt;/div&gt; &lt;/asp:Panel&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>To be clear, what I want is this grid of charts to stay fixed at 2x2:</p> <p><img src="https://i.stack.imgur.com/9zGSk.png" alt="Correct 2x2 grid"></p> <p>What I'm getting is this, a 3x2 grid:</p> <p><img src="https://i.stack.imgur.com/Ywuq5.png" alt="Incorrect 3x2 grid"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload