I'm using the jqgrid plugin for jquery and jquery ui and I would like to change the AJAX url on a dom event. this is the instatiation of the jqgrid table:
jQuery("#list").jqGrid({
url:'AJAX/JSON/json_member_mail.aspx',
datatype: 'json',
mtype: 'GET',
colNames:['','Title', 'from','message',''],
colModel :[
{name:'checkbox', index:'pms.pm_id', width:15, gridstate:'hidden',sortable:false} ,
{name:'title', index:'pmthreads.pmthread_subject', width:140},
{name:'from', index:'pms.pm_authoruser_id', width:110, align:'center',classes:'mofo_id' } ,
{name:'message', index:'message', width:445, sortable:false},
{name:'tasks', index:'tasks', sortable:false, width:65, align:'right'}
],
pager: '#pager',
rowNum:20,
rowList:[10,20,30],
width: '100%',
height: '800',
sortable:true,
sortname: 'someting that makes sense to the cragted mysql query ',
sortorder: 'desc',
viewrecords: true,
caption: 'Mail'
});
now this page shows the user mail inbox in my program... now I would like to change the url to member_mail_sent to show the outbox but then I would also need to change colName and colModel, sortname etc...
I remember seeing something that made this alot easier in the documentation but now I can't find it anywhere.