Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6052811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:58:11+00:00 2026-05-23T07:58:11+00:00

I am adding to my jqgrid with below code all except cfgname and updateDate

  • 0

I am adding to my jqgrid with below code all except cfgname and updateDate gets displayed into my grid, what is the problem here?

function addRow(cfgid,cfgname,hostname,cfgDesc,productId,cfgType,updateDate,emailAddress,absolutePath)
{
console.info(cfgid+", "+cfgname+", "+hostname+", "+cfgDesc+", "+productId+", "+cfgType+", "+updateDate+", "+emailAddress+", "+absolutePath);
var myrow = {cfgid:cfgid, '':'', cfgname:cfgname, hostname:hostname, cfgDesc:cfgDesc, productId:productId,hostname:hostname,cfgType:cfgType,emailAddress:emailAddress,absolutePath:absolutePath};
$("#list1").addRowData("1", myrow);
$("#list1").trigger("reloadGrid");
}

var grid = jQuery("#list1");

            grid.jqGrid({

              datastr : xml,
              datatype: 'xmlstring',
              colNames:['cfgId','','Name', 'Host', 'Description','Product', 'Type', 'Last Updated Time','Last Updated By',''],
              colModel:[
                  {name:'cfgId',index:'cfgId', width:90, align:"right", hidden:true},
                  {name:'',index:'', width:15, align:"right",edittype:'checkbox',formatter: "checkbox",editoptions: { value:"True:False"},editable:true,formatoptions: {disabled : false}},
                  {name:'cfgName',index:'cfgName', width:90, align:"right"},
                  {name:'hostname',index:'hostname', width:90, align:"right"},
                  {name:'cfgDesc',index:'cfgDesc', width:90, align:"right"},
                  {name:'productId',index:'productId', width:60, align:"right"},
                  {name:'cfgType',index:'cfgType', width:60, align:"right"},
                  {name:'updateDate',index:'updateDate', width:120, align:"right"},
                  {name:'emailAddress',index:'emailAddress', width:120, align:"right"},
                  {name:'absolutePath',index:'absolutePath', width:90, align:"right", hidden:true},
              ],
              pager : '#gridpager',
              rowNum:10,
              scrollOffset:0,
              height: 'auto',

              autowidth:true,
              viewrecords: true,
              gridview: true,
              xmlReader: {
                  root : "list",
                  row: "com\\.abc\\.db\\.ConfigInfo",
                  userdata: "userdata",
                  repeatitems: false
              },
              onSelectRow: function(id,status){
                  var rowData = jQuery(this).getRowData(id); 
                  configid = rowData['cfgId'];
                  /*configname=rowData['cfgName'];
                  configdesc=rowData['cfgDesc'];
                  configenv=rowData['cfgType'];
                  filename=rowData['fileName'];
                  updatedate=rowData['updateDate'];
                  absolutepath=rowData['absolutePath'];*/
                  if(status==true)
                  {

                  }

                  rowChecked=1;
                  currentrow=id;
                  }
}
               }

            });
            grid.jqGrid('navGrid','#gridpager',{edit:false,add:false,del:false});

Here is a snapshot

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:58:11+00:00Added an answer on May 23, 2026 at 7:58 am

    There are some errors in your code.

    The first error: as you fill myrow = {...} you set cfgname:cfgname instead of cfgName:cfgname (your column in the grid has name:'cfgName' property and not name:'cfgname')

    The second error: you display only the updateDate with respect of console.info, but don’t set the property updateDate:updateDate of the myrow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's an addition for previous my question about adding columns into jqGrid-based table. Here
Im trying to create an additional function for jqGrid to simplify adding JSON data
We have a jqGrid that shows the search box above the grid at all
See i have this following code below, at line no.9 i'm calculating some dates
Code below sets default values for new row if row is added using form.
I want to upload files when adding or modifying records to a jqgrid. How
I'm initializing the grid like so: $(#mainGrid).jqGrid({ url : g_MainGridUrl, datatype : 'json', height
I'm using jqGrid and adding my own onclick event to each cell of data
I have been trying to use jqgrids, default CRUD options. Below is my code:
I need help with filtering rows from jqgrid. I have a grid with large

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.