Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadPaginationControl Not Compatible with RadDataGrid #355

Open
rashadrivera opened this issue Dec 29, 2018 · 1 comment
Open

RadPaginationControl Not Compatible with RadDataGrid #355

rashadrivera opened this issue Dec 29, 2018 · 1 comment

Comments

@rashadrivera
Copy link

rashadrivera commented Dec 29, 2018

Summary

The RadDataGrid and RadPaginationControl solver several common UI problems. However, they are mutually incompatible and cannot be used together to solve a very fundamental UI design pattern; data-grid with pagination support.

RadDataGrid is not derived from the Windows.UI.Xaml.Controls.Primitives.Selector class. In addition, the RadPaginationControl class has a PageProvider property which is class specific and thus is not flexible enough to work with any other types. It could be more adaptable if this property's type was Windows.UI.Xaml.Controls.Primitives.ISelector (an interface that Windows.UI.Xaml.Controls.Primitives.Selector implements).

API Changes

Suggestion 1
The RadPaginationControl's PageProvider class should be of type Windows.UI.Xaml.Controls.Primitives.ISelector instead of the concrete Selector class. This would allow us to implement any control we'd like.

Suggestion 2
In addition, the RadDataGrid should implement the Windows.UI.Xaml.Controls.Primitives.ISelector interface. This second suggestion would remove the implementation complexity for the user community and embed the implementation details into the RadDataGrid class.

e.g.

If RadPaginationControl.PageProvider was of type Windows.UI.Xaml.Controls.Primitives.ISelector instead of Selector, then we could create a custom RadDataGrid class that implements this interface and do the following....

var grid = new MyCustomRadDataGrid();
this.idRadPaginationControl.PageProvider = grid;

If RadDataGrid implemented the Windows.UI.Xaml.Controls.Primitives.ISelector type, then the user community would not need to create a custom RadDataGrid class.

Intended Use Case

With both of the aforementioned changes, RadDataGrid and RadPaginationControl can be used together. This would provide seamless data-grid, pagination support for the user community.

If only the first suggestion is implemented, then the user community would still be able to define a custom RadDataGrid derivatives that implement the Windows.UI.Xaml.Controls.Primitives.ISelector; thus achieving the same objective.

@APopatanasov
Copy link
Collaborator

Hi @rashadrivera ,

Currently, the ISelector interface is internal and I don't believe it will be made public any time soon. Even if the interface is public there are some properties that will not be appropriate for the DataGrid - like the SelectedValuePath.

I will approve the suggestion for the PaginationControl for making the control work with the DataGrid - we can think of an example how to enable this because changing the PageProvider will be a major breaking change in the control.

If your intention was to use the PaginationControl for implementing a paging like functionality with the DataGrid, please check the attached sample that demonstrates how to achieve this using a simple buttons.

Hope this helps.
DataGridPaging.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants