Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET jQuery JQGrid
I use two jqgrid. I want when click on row in grid1 then grid2 show data by Ajax on base parameters of grid1. How to change data of grid2 by Ajax? this code for grid2
 
$("#gridrelatedLette").jqGrid(
{
    url: "GetLetterInformationHandler.ashx?CurrentUser=" + 1157 + "&IndCode=" + rowData["PctIndCode"] + "&IndSerial=" + rowData["PctIndNum"] + "&TabName=relatedLetters",
    datatype: 'json',
    width: $("#relatedLetterTab").width()-20,
    height: a1,
    direction: "rtl",
    colNames: ['1', '2', '2', '3', '4', '5','6',],
    colModel: [
        { name: 'IRltType', width: 40, sortable: false, hidden: false, template: CenterTemplate },
        { name: 'IRltLettDate', width: 60, sortable: false, hidden: false, template: CenterTemplate },
        { name: 'IRltLettNum', width: 60, sortable: false, hidden: false, template: CenterTemplate },
        { name: 'IRltLettType', width:30, sortable: false, hidden: false, template: CenterTemplate },
        { name: 'IndTopic', width: 100, sortable: false, hidden: false, template: CenterTemplate },
 
    ],
    rowNum: 20,
    loadonce: true,
    rowList: [5, 10, 20],
    recordpos: "left",
    ignoreCase: true,
    toppager: true,
    viewrecords: true,
    sortorder: "desc",
    scrollOffset: 1,
    editurl: 'clientArray',
    shrinkToFit: true ,
    jsonReader:
    {
        repeatitems: false,
    },
    rowattr : function(rd) {
        return { "class": "myRowClass" };
    },
    gridview: true,
});
This code is a function that when click on one of the row of grid1 is called and rowData means the information of row(this function call in selectedrow of grid1 and parameter change by click on row."relatedLetters" is name of tab that jqgri2 inside this tab
Posted 25-May-13 9:23am
zsh64885

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 545
1 Kornfeld Eliyahu Peter 407
2 Maciej Los 369
3 DamithSL 221
4 OriginalGriff 218
0 OriginalGriff 6,383
1 DamithSL 4,879
2 Maciej Los 4,476
3 Kornfeld Eliyahu Peter 4,056
4 Sergey Alexandrovich Kryukov 3,927


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100