Note that there are some explanatory texts on larger screens.

plurals
  1. POEdit button doesn't show up
    primarykey
    data
    text
    <p>I have an asp.net page. There is a button "Edit" on the bottom that is invisible by default. By clicking a button on the left side bar, it is supposed to be shown. But it is not working, help needed. Thanks. Code:</p> <pre><code>&lt;div id="wrap"&gt; &lt;div id="header"&gt; &lt;/div&gt; &lt;div id="nav"&gt; &lt;asp:Button ID="Lookup" runat="server" Text="Lookup" CssClass="nav_buttons" ClientIDMode="Static"/&gt; &lt;asp:Button ID="Metric" runat="server" Text="Metric" CssClass="nav_buttons" /&gt; &lt;/div&gt; &lt;div id="sidebar"&gt; &lt;asp:Button ID="Button1" runat="server" Text="Button1" ClientIDMode="Static" CssClass="sidebar_buttons" OnClick="Button1_Click" /&gt; &lt;asp:Button ID="Button2" runat="server" Text="Button2" CssClass="sidebar_buttons" /&gt; &lt;/div&gt; &lt;div id="sameheight"&gt; &lt;div id="gridview"&gt; &lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" AutoGenerateEditButton="True" AutoGenerateSelectButton="True" /&gt; &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&lt;%$ ConnectionStrings:ConnectionString %&gt;" SelectCommand="SELECT * FROM [t1]"&gt;&lt;/asp:SqlDataSource&gt; &lt;asp:GridView ID="GridView2" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="sKey" DataSourceID="SqlDataSource2" /&gt; &lt;asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="&lt;%$ ConnectionStrings:ConnectionString %&gt;" SelectCommand="SELECT * FROM [t2]"&gt;&lt;/asp:SqlDataSource&gt; &lt;/div&gt; &lt;div id="btnEdit"&gt; &lt;asp:Button ID="Edit" runat="server" ClientIDMode="Static" Text="Edit" OnClientClick="javascript:Edit_Click();return false;" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;script&gt; $(document).ready(function () { var divone = $("#sidebar").height(); var divtwo = $("#gridview").height(); var maxdiv = Math.max(divone, divtwo); $("#sidebar").height(maxdiv); $("#gridview").height(maxdiv); }); $("#Button1").click(function (event) { $("#Edit").show(); }); &lt;/script&gt; &lt;/div&gt; </code></pre> <p>CSS:</p> <pre><code>#wrap { width: 800px; background-color: #99c; overflow: hidden; } #header { border-style: solid; border-width: 1px; background-color: #ddd; width: 800px; padding-top: 30px; padding-bottom: 30px; } #sidebar { float: left; width: 125px; padding-top: 10px; background-color: #C0C0C0; } #nav { background-color: #c99; padding-top: 30px; padding-bottom: 30px; width: 800px; border-style: solid; border-width: 1px; } </code></pre> <p>.sidebar_buttons { margin-top: 10px; margin-left: 2px; width: 120px; }</p> <pre><code>#gridview { float: right; width: 675px; } #Edit { float: left; display: none; } #sameheight { float: right; } </code></pre> <p>Code behind:</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace WebTest { public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { GridView1.Visible = false; GridView2.Visible = false; } protected void Button1_Click(object sender, EventArgs e) { GridView1.DataBind(); GridView1.Visible = true; GridView2.DataSource = null; GridView2.Visible = false; } } </code></pre> <p>} Image layout: <img src="https://i.stack.imgur.com/hews2.png" alt="Layout"></p>
    singulars
    1. This table or related slice is empty.
    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.
    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