Please let me apologize for misleading you with my last post.
I regret to say that this statement is not true:
"Getting back to your question what is the difference:
- ObjectView supports IQueryable as underlying collection for the data source, which means you can easily query data, shape the result and enjoy LINQ in your code. For example you can have server side sorting and paging.
Actually, the ObjectView is an obsolete component in our product and has not been updated after the new context-based API, directed to LINQ development was introduced.
If you want to do sorting and filtering using ObjectProvider
you have to use OQL
as the query language instead of LINQ
OQL has similar syntax to SQL, and it issues queries as strings not as expressions as LINQ does.
If you like to filter your data on the server side you can add a "WHERE" clause to the OQL like this:
"SELECT * FROM CategoryExtent AS x WHERE x.CategoryName = 'Hatchback'"
In order to sort data add "ORDER BY" clause like this:
"SELECT * FROM CategoryExtent AS x ORDER BY x.CategoryName ASC"
Our online documentation
contains a lot more information about OQL and how to use it.
Paging results get very tricky to do using OQL.
Depending on your various scenarios you can use ObjectProvider/ObjectView
- ObjectProvider/ObjectView is good for plain binding for DataGridViews with sorting done via OQL and no paging;
- BindingSource + manual handling of data context and LINQ queries is good for more advanced scenarios;
Regarding about your question about multiple object views - you need a pair of ObjectProvider/ObjectView for each independent bound control in your forms. If you share the pair between two bound controls expect them to share data too. You can reuse the same data context for all bound controls.
Again, I apologize for any inconvenience this might have caused you.
the Telerik team