0
我试图用json数据在mvc项目中使用jqwidget网格。用于日期字段的网格单元格格式是问题。下面的代码获取像“/ Date(1340204039263)/”的单元格。我该如何解决这个问题?jqwidget json数据的网格单元格格式
$(document).ready(function() {
// prepare the data
var source = {
datatype: "json",
datafields: [{ name: 'PersonelId' }, { name: 'Ad' }, { name: 'DogumYili' }, { name: 'UyelikTarihi'}],
url: 'BindBasicGrid'
};
//var dataAdapter = new $.jqx.dataAdapter(source);
var dataAdapter = new $.jqx.dataAdapter(source, {
downloadComplete: function (data, status, xhr) { alert(JSON.stringify(data)); },
loadComplete: function (data) { },
loadError: function (xhr, status, error) { alert(JSON.stringify(xhr)); }
});
$("#jqxgrid").jqxGrid({
source: dataAdapter,
theme: 'classic',
columns: [{ text: 'Ad', datafield: 'Ad', width: 250 },
{ text: 'Doğum Yılı', datafield: 'DogumYili', width: 150 },
{ text: 'Üyelik Tarihi', datafield: 'UyelikTarihi', cellsformat: 'D', width: 180}]
});
});
它的工作,谢谢。 – serefbilge 2012-07-07 16:47:36