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_TopicIcon
problem form editing for ClientArray
16/04/2009
22:20
Avatar
webedge
New Member
Members
Forum Posts: 1
Member Since:
17/04/2009
sp_UserOfflineSmall Offline

Hello all,

I'm trying to use the grid in an adobe Air application that may run without a web server or an internet connection. So I'm loading the data into the grid from an XML file and using Form Editing. When I submit the Add, Edit or Delete I don't want a server Post just update the grid and I'll handle saving to the XML file myself. To do this I've got URL and EditURL set to ClientArray.

What is happening is that the form comes up and functions ok except when I hit the submit button. The onlickSubmit and beforeSubmit events fire ok and the 'Processing...' label appears but then nothing. It doesn't come back from the Post and refresh the grid.

Here's the code

 

<table id="list" class="scroll"  cellpadding="0" cellspacing="0"></table>
<div id="pager" class="scroll" style="text-align:center;"></div>
<input type="BUTTON" id="adddata" value="Add password" /><input type="BUTTON" id="bedata" value="Edit Selected" /><input type="BUTTON" id="dedata" value="Delete Selected" />

<script type="text/javascript">
 var mystr = readXMLFile();
 

  jQuery("#list").jqGrid({
   url:'clientArray',
   editurl:'clientArray',
    datatype: 'xmlstring',
    datastr : mystr,
    colNames:['Site','Username', 'Cue'],
    colModel :[
      {name:'site', index:'site', width:250, align: 'left', editable : true, required:true, sortable : true, editoptions:{size:25}},
      {name:'username', index:'username', width:250, align: 'left', required:true, sortable : true,editable:true, editoptions:{size:25}},
      {name:'cue', index:'cue', width:250, align: 'left', required:true, sortable : true,editable:true, editoptions:{size:25}},
 ],
    pager: jQuery('#pager'),
    rowNum:10,
 width:750,
 sortname: 'site',
    viewrecords: true,
    imgpath: 'themes/coffee/images',
    caption: 'Password Reminders',
 
  });
$("#dedata").click(function(){
 var gr = jQuery("#list").getGridParam('selrow');
 //getSelectedRow();
 if( gr != null ) jQuery("#list").delGridRow(gr,{reloadAfterSubmit:true, caption:'Delete Password',onclickSubmit:deletingData, afterSubmit:afterDelData,modal:true});
 else alert("Please Select Row to delete!");
});
$("#bedata").click(function(){
 var gr = jQuery("#list").getGridParam('selrow');
 if( gr != null ) jQuery("#list").editGridRow(gr,{reloadAfterSubmit:true,modal:true, bSubmit: 'Save',closeAfterEdit:true});
 else alert("Please Select Row");
});
$("#adddata").click(function(){
 jQuery("#list").editGridRow("new",{reloadAfterSubmit:true, bSubmit: 'Save', closeAfterAdd:true});
 
});

function afterDelData(){
 alert ("done");
}
function deletingData(){
 alert("done");
 return true;
 }
function editingData(dat){
 return true;
}
</script>

Any Idea?




20/04/2009
06:34
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

clientArray does not work in form editing instead. You can try to set reloadAfterSubmit:false, but I'm not sure that this will help. I'm currently develop a various type of submiting  - serverside, clientArray, custom function in all editing modules.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

29/12/2009
14:33
Avatar
Roman
Guest
Guests

Hi Tony,

Are there any news on this feature?  I'm also trying to use form editing with client side data, if I understand correctly this is unsupported for now?

Thanks,

Roman

29/12/2009
16:54
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You can do it without any cahges into the code.

You will need just to create a dummy empty file on the server and set the editurl to this file and you will have the desired result.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
53 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