This question is locked. New answers and comments are not allowed.
I have a WCF data service (odata) where we use a custom authentication method by inserting a custom header into the request. It looks like the only way to bind the MVC grid to the service and get proper paging is by providing the URL to the service. I would like to be able to bind to a DB Model Container like I can in the WCF Control. Is this possible? If not, what is the best way to make sure that I can get WCF data service paged data into the MVC Grid?
XAML from my WCF Project:
Code behind from my WCF Project:
What I'd like to do in my MVC Project:
XAML from my WCF Project:
<Grid> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <telerik:RadGridView x:Name="GridView" ItemsSource="{Binding PagedSource, ElementName=radDataPager}" AutoGenerateColumns="True" Grid.Row="0" Width="700" Height="350" /> </Grid> </Grid> <telerik:RadDataPager Name="radDataPager" PageSize="10" Grid.Row="1" DisplayMode="FirstLastPreviousNextNumeric, Text" />Code behind from my WCF Project:
MDP2DBModelContainer context = new MDP2DBModelContainer(serviceRootUri);//add headers to context.SendingRequestradDataPager.Source = context.PagedData;What I'd like to do in my MVC Project:
@using Telerik.Web.Mvc.UI@model modelWithContext@(Html.Telerik().Grid(Model.Context.PagedData) .Name("ActivitiesGridModelBound") .Groupable() .Sortable() .Scrollable() .Pageable() .Filterable())