简体   繁体   中英

Silverlight dataGrid binding with ria Service doesn' work

i'm new to Silverlight and it's totally driving me crazy!

i'm using SL4 and trying to bind datagrid with a Domain Service Query:

what i did exactly is i generate an ado.net entity model from my database, then create a domain Service class from this model.

then in my page i put Datagrid & button.

in the click event for this button i write this code:

RRDomainContext rr = new RRDomainContext();
this.dataGrid1.ItemsSource = rr.Rooms;
this.rr.Load(this.rr.GetRoomsQuery());

when this method executed the nothing changed at the datagrid.

can anyone help me with this ?

Silverlight is async only, so if the query is a large one it can either take a long time to return, or if it's a large query that goes over the 64k limit it can fail and you don't know about it.

As a thought, if you're using RIA services to bind to something reasonably simple, use the "Data Source" for the entity, it's a lot less likely to give issues.

Link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM