You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataPager determines the capabilities of the dataset by checking whether the data context implements IPageableGridViewDataSet<IPagingFirstPageCapability> and other *Capability interfaces, and renders the UI based on those capabilities.
The problem is that the DataContextStack in the control has type IPageableGridViewDataSet<IPagingOptions> from the viewmodel directive, but this type doesn't implement those capabilities. Therefore, the condition evaluates to false.
@exyi Is there a way around this? I tried to set the viewmodel to IPageableGridViewDataSet<PagingOptions>, but it throws an invalid cast error.
It is expected behavior, if you give DataPager binding of type IPageableGridViewDataSet<IPagingOptions>, it will not render anything. I think there should be some warning, as it's obviously unintended, but I don't think we have a reliable way to "fix it".
I tried to set the viewmodel to IPageableGridViewDataSet, but it throws an invalid cast error.
I think this should work (if the viewmodel actually is IPageableGridViewDataSet<PagingOptions>), I'll have a look why is it crashing
The pager crashes when supplied with binding returning IPageableGridViewDataSet<PagingOptions>. This is clearly a bug and I fixed it your branch
The dataset is not refreshed, because it does not implement IRefreshableGridViewDataSet. I'm not sure what to do with this one. Options are
Nothing, it's intended behavior. Not great
We can call RequestRefresh based on the dynamic type instead of the static return type. In this case it's possible, because it's a command and we always have the instance. However, I don't like that the behavior will be different for static commands (where this method has to be translated to JS), and it's not consistent most other decision being made on the static type
Move RequestRefresh() method to IBaseGridViewDataSet and only keep IRefreshableGridViewDataSet for the IsRefreshRequired property. Rationale is that the RequestRefresh does not add any real constaints on the base dataset, since it may be implemented as empty method without any state (I'd consider having this as default implementation on supported platforms)
Activity
exyi commentedon Feb 25, 2026
It is expected behavior, if you give DataPager binding of type
IPageableGridViewDataSet<IPagingOptions>, it will not render anything. I think there should be some warning, as it's obviously unintended, but I don't think we have a reliable way to "fix it".I think this should work (if the viewmodel actually is
IPageableGridViewDataSet<PagingOptions>), I'll have a look why is it crashingexyi commentedon Feb 25, 2026
Ok I see that are two problems:
IPageableGridViewDataSet<PagingOptions>. This is clearly a bug and I fixed it your branchRequestRefresh()method toIBaseGridViewDataSetand only keepIRefreshableGridViewDataSetfor theIsRefreshRequiredproperty. Rationale is that theRequestRefreshdoes not add any real constaints on the base dataset, since it may be implemented as empty method without any state (I'd consider having this as default implementation on supported platforms)