Hi there,
I really like the telerik ajax tools, but I have a slight problem now: the property value of a subobject is not displayed in the grid: Status.Shortcut. Pasting the json code (extracted by fiddler2) into a json viewser, looks ok.
Telerik-Version: v.2010.2.929.35
Even when creating a client side array, it doesn't display subobject's values.
Alerting the field says: ok - is there.
WHAT CAN I DO? Please help.
Thank you very much.
Client-Side DataBinding:
Page.aspx:
The JSONed Data
I really like the telerik ajax tools, but I have a slight problem now: the property value of a subobject is not displayed in the grid: Status.Shortcut. Pasting the json code (extracted by fiddler2) into a json viewser, looks ok.
Telerik-Version: v.2010.2.929.35
Even when creating a client side array, it doesn't display subobject's values.
Alerting the field says: ok - is there.
WHAT CAN I DO? Please help.
Thank you very much.
Client-Side DataBinding:
function UpdateGrid(rows) { clearError(); var grid = $find("<%=gridTickets.ClientID %>"); var mtv = grid.get_masterTableView(); alert(rows[0].Status.Shortcut); // <--WORKS GREAT!!!! mtv.set_dataSource(rows); mtv.dataBind(); return; }Page.aspx:
<telerik:RadGrid ID="gridTickets" runat="server" > <MasterTableView DataKeyNames="Id"> <Columns> <telerik:GridBoundColumn DataField="Id" HeaderText="Id" Display="false" /> <telerik:GridBoundColumn DataField="Status.Shortcut" HeaderText="Status" /> <telerik:GridBoundColumn DataField="Subject" HeaderText="Betreff" /> </Columns> </MasterTableView> </telerik:RadGrid> The JSONed Data
{ "d": [ { "__type": "Ticket:#TicketWeb.Entities", "Area": { "__type": "TicketArea:#TicketWeb.Entities", "Id": 0, "Name": "test", "Shortcut": "test" }, "AreaId": 0, "Comments": null, "CostCenter": null, "CostCenterId": 0, "Created": "\/Date(1287085525987+0200)\/", "DontSendMailsAtInsert": false, "DueDate": null, "Duration": 0, "FinishDate": null, "From": null, "FromId": 0, "Guid": "6d9ac3f8-2bd4-4338-83cc-e85375e90039", "Id": 0, "InCharge": null, "InChargeId": 0, "LegacyId": null, "LegacyUid": null, "Logs": null, "ParentTicket": null, "ParentTicketId": 0, "PercentFinished": 0, "PhoneNumber": null, "Priorities": [ { "__type": "Priority:#TicketWeb.Entities", "Value": 0 }, { "__type": "Priority:#TicketWeb.Entities", "Value": 1 }, { "__type": "Priority:#TicketWeb.Entities", "Value": 2 }, { "__type": "Priority:#TicketWeb.Entities", "Value": 3 } ], "Priority": 0, "Reason": null, "ReceivedDate": null, "Responsible": null, "ResponsibleId": 0, "Revision": 0, "SortIndex": 0, "Specification": null, "StartDate": null, "Status": { "__type": "Status:#TicketWeb.Entities", "Id": 0, "MarksFinish": false, "MarksStart": false, "MarksStatusForNewSubProjects": false, "Name": "testkaka", "SetForNewTickets": false, "Shortcut": "kakakka", "SortIndex": 0 }, "StatusId": 0, "SubProjects": null, "Subject": "HI", "TicketReasonId": 0, "TicketType": null, "TicketTypeId": null, "TypeOfCosts": null, "TypeOfCostsId": 0 } ] }