I have GridView and DataPager, both have source of QueryableDataServiceCollectionView:
var ctx =
new
MyContext();
var query = (DataServiceQuery<ArtiklSifarnik>)ctx.ArtiklSifarnik.OrderBy(x => x.Sifra);
var view =
new
QueryableDataServiceCollectionView<ArtiklSifarnik>(ctx, query);
view.PropertyChanged += OnPropertyChanged;
view.LoadedData +=
OnLoadedData;
view.PageSize = 100;
view.AutoLoad =
true
;
gridView.ItemsSource = view;
pager.Source = view;
On selecting grid row and removing one item on button click GridView is refreshed but my DataPager is blocked:
view.Remove(gridView.SelectedItem
as
ArtiklSifarnik);
What am I missing?
Thanks
10 Answers, 1 is accepted
0
Hello,
I tested the reported scenario locally and as it turns out once I remove an item from RadGridView, the pager becomes as ReadOnly and no navigation is possible any more. Do you mean this as blocked?
Regards,
Dimitrina
Telerik
I tested the reported scenario locally and as it turns out once I remove an item from RadGridView, the pager becomes as ReadOnly and no navigation is possible any more. Do you mean this as blocked?
Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Sasa
Top achievements
Rank 1
answered on 23 Jul 2015, 06:34 AM
Hi Dimitrina,
yes,​ that is what I thought.
0
Sasa
Top achievements
Rank 1
answered on 24 Jul 2015, 01:34 PM
Do you have any solution for that problem?
Thanks
0
Hi,
Would you try submitting the changes (i.e. the deleted item)? Does RadDataPager become usable?
Regards,
Dimitrina
Telerik
Would you try submitting the changes (i.e. the deleted item)? Does RadDataPager become usable?
Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Sasa
Top achievements
Rank 1
answered on 28 Jul 2015, 10:46 AM
Hi Dimitrina,
If I try submitting the changes like this:
view.Remove(gridView.SelectedItem
as
ArtiklSifarnik);
view.SubmitChanges();
I get an unhandled exception (you can see in the attachment).
Thanks
0
Hello,
I am sorry to hear that. I performed some more tests and as it turns out I got a similar error. Even after replacing RadDataPager with the Silverlight DataPager, the behavior was the same. This should mean there is not an issue with RadDataPager specifically.
After debugging with the source codes directly, the inner exception shows as a reason: Forbidden. The full message is:
<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">Forbidden</m:message></m:error>
How have you configured loading your data? In my case, I defined it like so:
Does the service itself allow modifications?
Regards,
Dimitrina
Telerik
I am sorry to hear that. I performed some more tests and as it turns out I got a similar error. Even after replacing RadDataPager with the Silverlight DataPager, the behavior was the same. This should mean there is not an issue with RadDataPager specifically.
After debugging with the source codes directly, the inner exception shows as a reason: Forbidden. The full message is:
<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">Forbidden</m:message></m:error>
How have you configured loading your data? In my case, I defined it like so:
public
MyNorthwindContext() :
base
(
new
Uri(
"http://services.odata.org/Northwind/Northwind.svc"
, UriKind.Absolute)) { }
Does the service itself allow modifications?
Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Sasa
Top achievements
Rank 1
answered on 28 Jul 2015, 01:42 PM
Hi,
my context code:
public
class
MyContext : EFATICWareDb2014_18032014Entities
{
public
MyContext() :
base
(
new
Uri(
"WcfDataService1.svc"
, UriKind.Relative)) { }
}
and my service:
public
class
WcfDataService1 : DataService<EFATICWareDb2014_18032014Entities>
{
// This method is called only once to initialize service-wide policies.
public
static
void
InitializeService(DataServiceConfiguration config)
{
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
// Examples:
config.SetEntitySetAccessRule(
"*"
, EntitySetRights.AllRead);
config.SetServiceOperationAccessRule(
"*"
, ServiceOperationRights.AllRead);
config.SetServiceActionAccessRule(
"*"
, ServiceActionRights.Invoke);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
}
}
and yes, it allow modifications.
Thanks
0
Hello,
Would it be possible for you to isolate the issue in a demo project and send it to us in a new support ticket? You can also take a look at this blog post for a reference on how to isolate an issue.
Regards,
Dimitrina
Telerik
Would it be possible for you to isolate the issue in a demo project and send it to us in a new support ticket? You can also take a look at this blog post for a reference on how to isolate an issue.
Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Sasa
Top achievements
Rank 1
answered on 29 Jul 2015, 01:13 PM
Hi Dimitrina,
my subscription expired and I can't open new support ticket but I have nothing else in this project, only this code I sent you and two controls, grid and pager, and entity data model.
Thanks
0
Hello,
My observations are that RadDataPager as well as MS DataPager becomes invisible since there are changes on the view (you can check this through view.HasChanges). Would you please try configuring your view so that changes can be committed or canceled and there are no pending changes any more? In case there are no changes on the view anymore and the control is still disabled while MS DataPager works fine, then I will need a demo project to debug it further.
Regards,
Dimitrina
Telerik
My observations are that RadDataPager as well as MS DataPager becomes invisible since there are changes on the view (you can check this through view.HasChanges). Would you please try configuring your view so that changes can be committed or canceled and there are no pending changes any more? In case there are no changes on the view anymore and the control is still disabled while MS DataPager works fine, then I will need a demo project to debug it further.
Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items