[RESOLVED]Bind grid to sql database using Jquery.

Hi,

I am new to jquery please help.

I am having a grid and want to bind the grid to my sql database table using JQuery.

Could any one help me with example.

 <script type="text/javascript">
        $(function () {// Document is ready.
            //oData Adaptor with DataManager
            var dataManager = ej.DataManager("http://mvc.syncfusion.com/Services/Northwnd.svc/Products");
            $("#Grid").ejGrid({
                dataSource: dataManager,
                columns: ["ID", "Name"],
                toolbarSettings: {

                showToolbar: true,

                toolbarItems: [

                   ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit,

                   ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update,

                   ej.Grid.ToolBarItems.Cancel
                ]
            },

            editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },

            allowPaging: true,

            });
        });
</script>
</head>
<body>
    <form id="form1" runat="server">
 <div id="Grid">

 </div>
    </form>
</body>

Thank You.

Regards,

sarrujog.

Hi sarrujog,

First ,according to your post ,The Grid Control you are using belong to the third party control which is out of our support scope.

I suggest that you can post your issue to their support forum:

https://www.syncfusion.com/support/forums

Second, you can refer to the links below  which instruct how to use jqGrid to get data from database:

http://www.codeproject.com/Articles/771767/JqGrid-In-MVC-Basics

http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx/

 

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,
Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you
completely understand the risk before retrieving any software from the Internet.

 

 

Best Regards,

Kevin Shen.

Leave a Reply