Hi
I am fooling around with SC a bit but stumbled across a odd issue.
In the docs(http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#type..DSDataFormat) it shows a certain format for the JSON. Which in my case does not get displayed in a listgrid
The exact JSON as show by firebug is:
{"startRow": 0, "data": [{"lastname": "last1", "firstname": "first1", "title": "Mr"}, {"lastname": "last2", "firstname": "first2", "title": "Mr"}], "totalRows": 2, "endRow": 2}
Though if I follow the example of the doc listed above it works fine. That JSON is:
[{"lastname": "last1", "firstname": "first1", "title": "Mr"}, {"lastname": "last2", "firstname": "first2", "title": "Mr"}]
Why is that so?
PS My code is as follows incase it is required
isc.DataSource.create({
ID:'peopleDS',
fields: [
{name:"title", title:"Title"},
{name:"firstname", title:"First Name"},
{name:"lastname", title:"Last Name"}
],
dataFormat:"json",
dataURL:'/people'
});
isc.Window.create({
ID: "modalWindow",
title: "Window",
autoSize:true,
autoCenter: true,
isModal: true,
showModalMask: false,
autoDraw: false,
showCloseButton: false,
showMinimizeButton: false,
items: [
isc.ListGrid.create({
ID: "contactsList",
dataSource:'peopleDS',
autoFetchData: true,
left: 50, top: 50,
width: 600,
height: 400,
alternateRecordStyles:true, showAllRecords:true
})
]
});
modalWindow.show();