Forum


23:38

19/03/2010

I have this a controller like this
public ActionResut GetJsonData(DateTime date, string sidx, string sord, int page, int rows)
{
....
}
how do I pass that date parameter to the controller from jqgrid?
here is my jqgrid
<script type="text/javascript">
var id = Date.parse('today');
jQuery(document).ready(function() {
jQuery("#ScheduledList").jqGrid({
url: 'DealerServices/JsonScheduledSpas/',
datatype: 'json',
mtype: 'GET',
colNames: ['Invoice', 'Company', 'Contact', 'Model', 'Customer', 'DSR'],
colModel: [
{ name: 'invoice', index: 'invoice', width: 50, align: 'left' },
{ name: 'company', index: 'company', width: 200, align: 'left' },
{ name: 'companyContactNumber', index: 'companyContactNumber', width: 100, align: 'left' },
{ name: 'descript', index: 'descript', width: 60, align: 'left' },
{ name: 'CustomerName', index: 'CustomerName', width: 130, align: 'left' },
{ name: 'DsrFirstName', index: 'DsrFirstName', width: 70, align: 'left' }
],
pager: jQuery('#Scheduledpager'),
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname: 'Id',
sortorder: "desc",
viewrecords: true,
imgpath: '../../../../Content/CSS/startTheme/Images/',
height: '250px'
});
});
</script>
How do I get that date variable passed to the controller?
[code]
02:20

10/08/2009

Hello twaldron,
if you really want to have date as a parameter of your conctoller, then you need at least modify url parameter of the jqGrid from
"DealerServices/JsonScheduledSpas/" to some with the date inside of url. Then you need add coresponding template in you MVC application which difines from which part of url the date should be fiiled.
Best regards
Oleg
17:20

19/03/2010

OlegK said:
Hello twaldron,
if you really want to have date as a parameter of your conctoller, then you need at least modify url parameter of the jqGrid from
"DealerServices/JsonScheduledSpas/" to some with the date inside of url. Then you need add coresponding template in you MVC application which difines from which part of url the date should be fiiled.
Best regards
Oleg
Right, thats exactly what I am asking. How do I do that?
Most Users Ever Online: 715
Currently Online:
35 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66