hi, i am really lost at this, i am able to get the jason result and here is it from firebug console
{"d":[{"__type":"Table1:#","id":1,"name":"asd","Table2s":[{"__type":"Table2:#","id":2,"family":"dfdfd","fid":1}]},{"__type":"Table1:#","id":2,"name":"wewe","Table2s":[{"__type":"Table2:#","id":1,"family":"fff","fid":2}]}]}
now my question is how i can bind the child table2 on client side, what i mean is what is the syntax, i have tried table2.family but it is not working, also tried table1.table2.family and no luck ?
here is my WCF code
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode
=AspNetCompatibilityRequirementsMode.Allowed)]
public class Service2
{
[OperationContract]
[WebGet()]
public List<Table1> GetCustomers(string numberToFetch)
{
using (DataClassesDataContext context = new DataClassesDataContext())
{
DataLoadOptions options = new DataLoadOptions();
options.LoadWith<Table1>(c => c.Table2s);
context.LoadOptions = options;
return context.Table1s.Take(numberToFetch).ToList( );
}
}
}
and here is my ASPX code
<body xmlns:sys="javascript:Sys"
xmlns:dataview="javascript:Sys.UI.DataView">
<div id="CustomerView"
class="sys-template"
sys:attach="dataview"
dataview:autofetch="true"
dataview:dataprovider="Service2.svc"
dataview:fetchParameters="{{ {numberToFetch: 2} }}"
dataview:fetchoperation="GetCustomers">
<ul>
<li>{{name}}</li>
<li>{{family}}</li>
</ul>
</div>
i very much appreciate the help