简体   繁体   中英

How to implement paging for datagrid using LINQ to Entities in wpf?

I'm new in wpf. My main problem is to understand how DataGrid works with its datacontext. It would help me a lot because I don't know how to make a universal paging usercontrol for all my datagrids in the projects for different database tables. DataGrid converts received DataContext from object to some kind of list. How it is implemented? I tried to do some casting from object to IQueryable <System.Data.Objects.DataClasses.EntityObject> to generalize thinig because base class of every entity in the entity model is EntityObject class. But it doesen't work in runtime although I don't receive complains at design time.

I figured out myself what is all behind datagrid. Even if you didn't understand my question, it's not important anymore and thank you anyway.

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