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

  • SEARCH
  • Home
  • 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 8326005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:37:47+00:00 2026-06-09T00:37:47+00:00

I am totally new to jqGrid. I am populating the grid from an array

  • 0

I am totally new to jqGrid. I am populating the grid from an array with datatype:local.

var data=[
  {date : "01/01/2012",starttime:"10:15",endtime:"11:15",workfunction:"MA"},
  {date : "01/02/2012",starttime:"11:30",endtime:"12:30",workfunction:"CA"},
  {date : "01/03/2012",starttime:"13:30",endtime:"14:30",workfunction:"FC"},
  {date : "01/01/2012",starttime:"10:15",endtime:"11:15",workfunction:"MA"},
  {date : "01/01/2012",starttime:"11:30",endtime:"12:30",workfunction:"CA"},
  {date : "01/02/2012",starttime:"13:30",endtime:"14:30",workfunction:"FC"},
  {date : "01/02/2012",starttime:"10:15",endtime:"11:15",workfunction:"MA"},
  {date : "01/03/2012",starttime:"11:30",endtime:"12:30",workfunction:"CA"},
  {date : "01/03/2012",starttime:"13:30",endtime:"14:30",workfunction:"FC"}
  ];

$("#gridTable").jqGrid({
    data : data,
    editurl:"clientArray",
    datatype: "local",
    height : 250,
    colNames: [' ','Date','Start Time','End Time','Work Function'],
    colModel : [
                {name: 'myac', width:80, fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:true}},
                {name: 'date',index:'date',width: 100,sorttype:'date',editable:true,editoptions : {
                    dataInit : function(element){
                        formatDatepicker(element,data);

                    }
                }},
                {name: 'starttime',index:'starttime',width: 100,sorttype:'date',editable:true},
                {name: 'endtime',index:'endtime',width: 100,sorttype:'date',editable:true},
                {name: 'workfunction',index:'workfunction',width: 100,sorttype:'date',editable:true,edittype:"select",editoptions:{value:"MA:MA;CA:CA;FC:FC"}},
                ],
                pager: "#gridPager",
                caption : "Weekly Details",
                grouping : true,
                groupingView : {
                    groupField:['date']
                }

}).navGrid("#gridPager",{edit:true,add:true,del:false},
        //edit properties
        {
    zIndex : 950,

        }
);

Given above is the grid I am using. I am grouping the grid according to dates, and I am using jsp as the server side technology. My questions are:

  1. Can we add a row to a group without submitting it to the server.
  2. When a new row is created with a new date, will a new group form.
  3. Can we edit multiple rows and submit all at once.
  • 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-06-09T00:37:48+00:00Added an answer on June 9, 2026 at 12:37 am

    let me be sure if i understood you right…1. you want to add a row to grid but dont want to submit the data to server? it is possible…2. you have to be more clear on this requirement. 3. yes it is possible to take all the edit data of multiple rows and send the data to server.

    I’ll start with 3.

    you can use multiselect: true here, its like the easiest option. Select the rows which you want to edit and Implement onSelectRow with a function which will make your rows editable on selecting them.

    and then you can have a button which will take your edited rows data to server.

    how to make rows editable on selecting them

    onSelectRow: function(id){ 
    jQuery('#grid').editRow(id, true); }
    

    or there’s another alternative keep your all rows in editable mode

    gridComplete:OnGridComplete, //add this to your Jqgrid parameters
    
    javascript function
    
    function OnGridComplete(){
    
                var $this = $(this), rows = this.rows, l = rows.length, i, row;
                for (i = 0; i < l; i++) {
                    row = rows[i];
                    if ($.inArray('jqgrow', row.className.split(' ')) >= 0) {
                        $this.jqGrid('editRow', row.id, true);
                    }
                }
    
            }
    

    and how to take edited data to server just on one click, see my answer

    https://stackoverflow.com/a/11662959/1374763

    and now with you first question

    you should change the editUrl to clientarray,

    jQuery(“#grid_id”).jqGrid(‘saveRow’,”rowid”, false, ‘clientArray’);

    check this link and go to saveRow parametrs, for more info

    http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing

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

Sidebar

Related Questions

Totally new to Capistrano. I have a local git repository that I want to
I'm totally new to Flex (moving away from Java for now :(). I have
I am totally new to the graphical representation of the data. I want to
Totally new to programming so kindly excuse the silly question. I have this URL
im totally new when it comes to trying to make HTML code. I was
Im totally new to regex. I need your help. What is the regex function
I'm totally new to this WCF Services thing so any guidelines would be greatly
So I'm totally new to Haskell, hope it doesn't show too much. By any
I am totally new in appbiling service in android, and it seems to be
I'm totally new to AWS. I managed to have an instance that runs PHPMyAdmin.

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.