Hi,
I'm trying to bind a radgrid from client side with a ASMX web service using this markup:
The JSON being returned by the webservice is like so:
Problem is that the Cause column shows up empty. Cause is a nested object inside the main event object...how can I get the radgrid to display nested object's properties?
I'm trying to bind a radgrid from client side with a ASMX web service using this markup:
| <telerik:RadGrid ID="RadGrid1" AllowSorting="true" AllowPaging="true" AllowFilteringByColumn="true" |
| AutoGenerateColumns="false" runat="server"> |
| <MasterTableView> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Id" HeaderText="Id" DataType="System.Guid" Visible="false" /> |
| <telerik:GridBoundColumn DataField="Title" HeaderText="Title" /> |
| <telerik:GridBoundColumn DataField="Cause.Name" HeaderText="Cause"/> |
| <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" DataFormatString="{0:d}" DataType="System.DateTime"/> |
| </Columns> |
| </MasterTableView> |
| <PagerStyle AlwaysVisible="true" /> |
| <ClientSettings> |
| <DataBinding Location="WebService.asmx" |
| SelectMethod="GetEvents" SelectCountMethod="GetEventCount" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
The JSON being returned by the webservice is like so:
| {"d":{"__type":"EventDTO","EntityId":"20669908-bf86-4d72-90b0-38239eb6dfa5", |
| "Type":{"Name":"Entertainment","Description":"Test","Id":"1228a7b5-43e1-4cd5-b66d-b4afd43004b7", "CreateDate":"\/Date(1240385834617)\/","LastUpdatedDate":"\/Date(1240385834617)\/","DeletedDate":null,"TimeStamp":[0,0,0,0,0,0,35,152]}, |
| "Cause":{"Name":"Global Warming1","Description":"Test","Id":"399fcb2e-0bdc-4e4b-879f-0ee0e97a5db5", |
| "CreateDate":"\/Date(1240384333727)\/","LastUpdatedDate":"\/Date(1248085361140)\/","DeletedDate":null,"TimeStamp":[0,0,0,0,0,0,164,19]},"Title":"97979978978","Sites":null,"Location":"Pakistan","Description":"Testing Description \n", "StartDate":"\/Date(1240574400000)\/","CompletionDate":"\/Date(1246230000000)\/","RequiresVolunteerApproval":false,"Id":"0da73022-7d8d-4f79-a108-61c916a49fe8","CreateDate":"\/Date(1240389765160)\/","LastUpdatedDate":"\/Date(1240389765160)\/","DeletedDate":null,"TimeStamp":[0,0,0,0,0,0,148,192]}} |
Problem is that the Cause column shows up empty. Cause is a nested object inside the main event object...how can I get the radgrid to display nested object's properties?