jQWidgets Forums

jQuery UI Widgets Forums Grid Grid disapears after button click

This topic contains 1 reply, has 1 voice, and was last updated by  purell007 11 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Grid disapears after button click #47803

    purell007
    Participant

    After button click, the grid shows up for a second then disappears. When it shows up, the data is correct. The disapearing problem is my issue.

    <%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”JQXgrid.aspx.cs” Inherits=”JQXgrid” %>

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

    <html xmlns=”http://www.w3.org/1999/xhtml”>
    <head runat=”server”>
    <title></title>
    <link rel=”stylesheet” href=”Scripts/jqwidgets/styles/jqx.base.css” type=”text/css” />
    <script type=”text/javascript” src=”Scripts/jquery-1.10.2.min.js”></script>
    <script type=”text/javascript” src=”Scripts/jquery-ui.min.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxcore.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxmenu.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxgrid.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxgrid.selection.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxgrid.filter.js”></script>
    <script type=”text/javascript” src=”Scripts/jqwidgets/jqxgrid.sort.js”></script>
    <script type=”text/javascript” src=”Scripts/demos.js”></script>

    </head>
    <body>
    <form id=”form1″ runat=”server”>
    <script type=”text/javascript”>
    $(document).ready(function () {
    $(‘#<%=BtnGo.ClientID %>’).click(function () {

    source = {
    datatype: “xml”,
    datafields: [
    { name: ‘A’ },
    { name: ‘B’ },
    { name: ‘C’ }
    ],
    async: false,
    record: ‘Table’,
    url: ‘JQXgrid.aspx/BindDataJqxGrid’,
    };
    var dataAdapter = new $.jqx.dataAdapter(source,
    { contentType: ‘application/json; charset=utf-8’}
    );
    $(“#jqxgrid”).jqxGrid({
    source: dataAdapter,
    theme: ‘classic’,
    columns: [
    { text: ‘A’, dataField: ‘A’, width: 250 },
    { text: ‘B’, dataField: ‘B’, width: 150 },
    { text: ‘C’, dataField: ‘C’, width: 180 }
    ]
    });

    });

    });
    </script>

    <asp:Button ID=”BtnGo” runat=”server” Text=”Go” Width=”63px” />

    <div id=”jqxgrid”></div>

    </form>
    </body>
    </html>

    Grid disapears after button click #47804

    purell007
    Participant

    It was because of the asp button. If I make it a html input button it works then.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.