Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
problem reloading local data
04/11/2010
12:41
Avatar
zodic
New Member
Members
Forum Posts: 1
Member Since:
04/11/2010
sp_UserOfflineSmall Offline

Hello

I'm having problem reloading data after adding new row to a local set, the record added to local set uses a wrong ID so its not editable before reloading.

here is my code :

$(document).ready(function () {

  jQuery("#list2").jqGrid({
     url: 'http://localhost:2525/Admin/De.....t',
           datatype: "json",
                colNames: ['No', 'Name'],
                colModel: [
    { name: 'id', index: 'id', width: 45, resizable: true, editable: false },
  name: 'name', index: 'name', width: 500, resizable: true, editable: true },

    ],
                rowNum: 10,
                rowList: [10, 20, 30],
                sortname: 'id',
                sortorder: "desc",
                height: 310,
                scrollOffset: 0,
                pager: '#pager2',
                viewrecords: true,
     editurl: "http://localhost:2525/Admin/Department/JqGridOperation",
                loadonce: true,
                caption: "Department",
         
            });
                    jQuery("#list2").jqGrid('navGrid', '#pager2', //options
                        {view:true},
                        { reloadAfterSubmit: true }, // edit options  
                        { reloadAfterSubmit: true }, // add options
                        { reloadAfterSubmit: true }, // del options  
                     {} // search options
                    );
       });

I tried adding event to 'add options'(onClose, onclickSubmit,afterSubmit) to trigger reloadGrid but it fires on page reload.

reloadAfterSubmit: true
seems to have no effect at all on local data. also closeAfterAdd doesn't work at all. what am i doing wrong?
how can i fix this?
Edit : getting e is undefined when using afterSubmit event aswell.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
23 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information