.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

jqGrid

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net
 

Hi,

first read my script

$(function () {
            $("#tblGrid").jqGrid({
                datatype: function (pdata) { getData(pdata); },
                width:945,
                colNames: ['ID', 'Client Name'],
                colModel: [
           		                { name: 'Id'},
           		                { name: 'Name'}
           	               ], 
           	    pager: '#pgr', 
           	    sortname: 'id', 
           	    viewrecords: true, 
           	    sortorder: "desc"
            });
            
            jQuery("#tblGrid").jqGrid('navGrid','#pgr',{edit:false,add:false,del:false}); 
        });
        
        function getData(pData) {
       $.ajax({
                url: 'AjaxCallWebService.asmx/Client',
                type: "POST",
                contentType: "application/json; charset=utf-8",
                data: '{}',
                dataType : 'json',
                 success: function (data, textStatus) {
                    if (textStatus == "success"){
                                ReceivedClientData(data.d.rows);
                            }

                },
                error: function (data, textStatus) {debugger;
                    alert('An error has occured retrieving data!');
                }
            });           
        }
        
        function Re


View Complete Post


More Related Resource Links

JQGrid Loading deleted values

  

Hi,

This is quite strange. here is the issue:

Some Info:

1. I'm using a multi-select jqgrid.

2. I have my own delete button to delete multiple orders

The problem:

When i press the delete button on the pager of my jqgrid, the records are deleted from the database but JqGrid shows some records (4-5). On refreshing the grid, correct numbers of records are shown.


Here is the code:


function delorder() {
        var amg = $("#horder").getGridParam('selarrrow');
        var cont = amg.length;
        if (amg.length > 0) {

jqGrid with WebMethods in aspx.cs files

  

hi,

here is my code for jqgrid:


/// <reference path="jquery-1.3.2.js" />
/// <reference path="json2.js" />
/// <reference path="jquery.simplemodal.js" />
$(document).ready(function() {
    loaddata();

MVC and jqGrid

  

Guys

I am a trying some new things in MVC. Basically I always programmed in ASP.NET. Now I am trying to develop a sample application and I am trying to use jqGrid inside this application. However when I am running the application the grid is not showing and its giving me an undefined error.

 

The javascript is this

<link href="/Content/ui-lightness/jquery-ui-1.8.5.custom.css" rel="stylesheet" type="text/css" />

<link href="/Content/ui.jqgrid.css" rel="stylesheet" type="text/css" />

 

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

<script type="text/javascript" src="/Scripts/jgrid/jquery.jqGrid.min.js"></script>

<script type="text/javascript" src="/Scripts/jgrid/jqModal.js"></script>

<script type="text/javascript" src="/Scripts/jgrid/jqDnR.js"></script>

 

 

 

 

<script type="text/javascript">

$(document).ready(function () {

$("#list3").jqGrid({

url: '/Products/ProductsList',

datatype: "json",

mtype:"GET",

colNames: [&#

JqGrid enter infinitive loop when trigger reloadGrid

  

Hi guys,

I am using the JqGrid in my application and in one page I use the setGridParam to change the url and then call the trigger("reloadGrid") method. If the result json response is empty (no row data) my code end up in an infinitive loop reloading the grid. I have checked the gridComplete event and its not triggering the reload. Have any off you guys seen this before or know anything about it?

//Tomas


how to edit JQGrid with linq Stored Procedure?

  

Hi

I have JQgrid that it binds from linq using linq datasource,I want to know how can I enable delete,edit,add button in JQGrid using Stored procedure.Actually I write stored procedures i just want to know what parameters pass to them and how?

my  Add stored procedures is :

ALTER PROCEDURE dbo.AddStoredProcedure

@BookID int,

@MenuID int,

@Name nvarchar,

@regDate date,

@Author nvarchar,

@Publisher nvarchar,

@Price int,

@Description nvarchar,

@Status nvarchar

 

AS

 

Use JQgrid as control?

  

Hi

I created a usercontrol which has 2 jqgrid and I added this control into ajaxtab but when I clicked my menu item (that creates tab)

the control doesnt load in my tab what should I do?

here is my code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>HomePage</title>

    <!-- The jQuery UI theme that will be used by the grid -->
    <link rel="Stylesheet" type="text/css" media="screen" href="Themes/jquery-ui-1.8.2.custom.css" />
    <!-- The jQuery UI theme extension jqGrid needs -->
    <link rel="Stylesheet" type="text/css" media="screen" href="Themes/ui.jqgrid.css" />
    <!-- jQuery runtime minified -->
    <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
     <!-- The localization file we need, English in this case -->
     <script type="text/javascript" src="js/grid.locale-en.js"></script>
     <!-- The jqGrid client-side javascript -->
     <script type="text/javascript" src="js/jquery.jqGrid.min.js"></script>
     <script type="text/javascript" src="js/jquery.jqDatePicker.mi

How to disable the controls within the JQGrid on some other event

  

Hi,

I am trying to disable the controls within the JQGrid on some other event. Please let me know how can i do this. Below is my JQGrid Basically i want to disable the custom buttons btnDeleteExistingRoles, btnAddExistingRoles and the checkboxes that are created in the "Select" column( i have written a custom formatter for this). Please help

jQuery(document).ready(function() {

    $('#btnHdnExistingRoles').click(function() {
 
        var lastsel2;
 
        jQuery("#grdExistingRoles").GridUnload("#grdExistingRoles");
 
        jQuery("#grdExistingRoles").jqGrid({ url: '/SAPWebAccess/Role.mvc/GetExistingRoleForUser/',
 
            datatype: 'json', mtype: 'GET',
 
            colNames: ['Role ID', "<input type='checkbox' id = 'headerCheck' onclick='checkAll(\"grdExistingRole\");'>", 'Role Name', 'Role Text', 'Valid From'
 
          

connect jqgrid to database

  

 hi

I have a jqgrid and I want to connect to database in c# (Webforms) and I write below code,but it doesn t show any data in my jqgrid

would you please check my code and tell me what should I do?

<!------Gridpage.aspx-----------!>

<head runat="server">
    <title></title>
     <link rel="Stylesheet" type="text/css" media="screen" href="Themes/jquery-ui-1.8.2.custom.css" />
     <link rel="Stylesheet" type="text/css" media="screen" href="Themes/ui.jqgrid.css" />
     <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
     <script type="text/javascript" src="js/grid.locale-en.js"></script>
     <script type="text/javascript" src="js/jquery.jqGrid.min.js"></script>
     <script type="text/javascript" >
         jQuery(document).ready(function () {
             jQuery("#Grid1").jqGrid({
                 url: 'data.aspx',
                 datatype: 'json',
                 mtype: 'GET',
                 colNames: ['BookID', 'BookName'],
                 colModel: [{ name: 'BookID', index: 'BookID', wi

jqGrid with .Net 4.0

  

I upgraded my application from .Net 3.5 MVC 2 to .Net 4.0 MVC 2, and all of a sudden none of my jqGrids are working.  The grids all show up on the page with the correct columns etc., however there is no data in any of them anymore.

I debugged each page which contains a grid, and from my controllers and models the data is getting returned from my LINQ queries to the JSON data that I pass to the Grid.  I have not changed any of the code for the jqGrids one bit.  Of course IE only gives me the generic yellow yield symbol on the bottom of the browser saying "Error on Page", and of course the error detail is even more generic "object does not support this property or method".  I used to get these before even when the grids were working, so I'm not to concerned about these errror messages.

I can't understand why switching to 4.0 would couse my jqGrids not to load the data anymore.  I see telrik has come out with a jqGrid for ASP MVC, but wants $299 for it, don't know that I'm ready to spend that one something which should be free.

Has anyone experienced anything like this wen upgrading the framework?

Thanks,

Brian


jqGrid

  

Can some1 show me how to bind jqGrid with Razor in WMatrix?


TIA


Master Detail jqgrid

  

hi

I have a master jqgrid and I want to show detail jqgrid when I select one row in master but my problem is that when I run my page the detail jqgrid is shown and also select row in master data doesnt load in detail jqgrid.please help me

 

and here is my code:

--------------------------------------------this is the master.aspx code-------------------------------------------------------

<head runat="server">
    <title>SubGrid</title>
    <link rel="Stylesheet" type="text/css" media="screen" href="Themes/jquery-ui-1.8.2.custom.css" />
     <link rel="Stylesheet" type="text/css" media="screen" href="Themes/ui.jqgrid.css" />
     <link rel="Stylesheet" type="text/css" media="screen" href="Themes/style.css" />
     
     <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
     <script type="text/javascript" src="js/jquery.json-2.2.min.js"></script>
     <script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
     <script type="text/javascript" src="js/grid.locale-en.js">&

Edit,Add,Del in Jqgrid

  

Hi,

I have Master and Details JQgrid. I want to Add Edit,Add,Del buttons in my details footer. but my problem is that when I write the navgrid code it doesn't show in details's footer,and my second problem is master footer is not shown also. My Master JQgrid is not paging. what should I do?  


serverside code for Add,Edit,Del in jQGrid

  

Hi,

I have Master Details Jqgrids and I want my details jqgrid to have Add,Edit,Del options. now I have 2 problems :

1- when I click on my edit button, formedit just show submit & cancel buttons and none of the fields doesn't appeare.

2-in my server side page I don't know what codes I should write to be able to Add,Edit,del through JQgrid.

here is my code, would somebody help me please?

//JQgrid.aspx

 <title>Update</title>
     <link rel="Stylesheet" type="text/css" media="screen" href="Themes/jquery-ui-1.8.2.custom.css" />
     <link rel="Stylesheet" type="text/css" media="screen" href="Themes/ui.jqgrid.css" />
     <link rel="Stylesheet" type="text/css" media="screen" href="Themes/style.css" />
     
     <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
     <script type="text/javascript" src="js/jquery.json-2.2.min.js"></script>
     <script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
     <script type="text/javascript" src="js/grid.locale-en.js"></script>
     <script ty

jQuery jqGrid Edit Column

  

Hi,

I have sucessfully managed to set up the jqGrid and have it so that when a user clicks a row the final column turns into a combo box with three possible values. When they select a value and then select the next row the value is saved to the database.

What I need to do next is have it so that if they select option 'R' in the combo box I display a modal popup asking them if they definitely want to do that and making them provide some more information. But I'm having trouble figuring out how to access an event handler for the combo box in the grid so that I can do some sort of selectedindexchanged event.

Can anyone help?

 


Date issue in jqgrid

  

Hi team,

 

In my project i have to display date columan in jqgrid i'll sending date formate like 5/21/2011 12:00:00 AM to jqgrid

but the grid prints like /Date(1305916200000)/ and my grid col is

 

{ name: 'Date', index: 'Date', width:100, center: 'right', sorttype: "datetime", datefmt: "m/dd/yyyy h:i AMPM", search: true, sortable: true },

please help me in this issue................


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend