We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Syncfusion Grid is not working properly

Hi
I downloaded trial version of Syncfusion. Installation has sample code which run ass per online sample but when i try to replicate the code in my new sample project(for learning), its not working properly. 
Rows doesn't selects, columns didn't sort or move etc nothing is working except showing data.
According to my knowledge some javascript reference is missing so please help me asap

FlatGrid.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="FlatGrid.aspx.cs" Inherits="WebAppSyncfusionRND.FlatGrid" %>

<%@ Register Assembly="Syncfusion.Grid.Grouping.Web, Version=10.204.0.75, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"
    Namespace="Syncfusion.Web.UI.WebControls.Grid.Grouping" TagPrefix="syncfusion" %>
<%@ Register Assembly="Syncfusion.Shared.Web, Version=10.204.0.75, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"
    Namespace="Syncfusion.Web.UI.WebControls.Tools" TagPrefix="syncfusion" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
    </asp:ScriptManager>
    <syncfusion:GridGroupingControl ID="GridGroupingControl1" runat="server" AjaxAutoformat="Midnight"
        EnableCallbacks="false" ShowGroupDropArea="false" EnableAjaxMode="true" EnableAjaxPaging="true">
        <TableDescriptor AllowFilter="true">
        </TableDescriptor>
        <TableOptions AllowSortColumns="false" />
    </syncfusion:GridGroupingControl>
</asp:Content>

Code behind

SqlConnection conn;
        SqlDataAdapter adapter;
        DataSet ds;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GetData();
            }
        }

        private void GetData()
        {
            try
            {
                conn = new SqlConnection("Password=sameer;Persist Security Info=True;User ID=sa;Initial Catalog=Northwind;Data Source=SAM");
                adapter = new SqlDataAdapter("SELECT Top (15) [ProductID], [ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder] FROM Products", conn);
                ds = new DataSet();
                adapter.Fill(ds);
                DataTable myDataTable = ds.Tables[0];

                this.GridGroupingControl1.DataSource = myDataTable;
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

1 Reply

RD Rakesh D Syncfusion Team September 3, 2012 06:59 AM UTC

 

Hi Sameer Wanwey,

 

Thanks for using Syncfusion products.

 

As you mentioned it is because of script reference, grid is not working. Add the reference of “jquery-1.4.1.min.js” from your script folder to the page or master page. Now you can perform the operations on your created sample project. Please refer to following code snippet for details.

 

[ASPX]

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>

<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release"></asp:ScriptManager>

<syncfusion:GridGroupingControl ID="GridGroupingControl1" runat="server" ……….>

</syncfusion:GridGroupingControl>

</asp:Content>

 

Please let me know if you have any concern.

 

Regards,

Rakesh D


Loader.
Up arrow icon