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

Refactoring of GridViewDataSet #1548

Merged
merged 64 commits into from
Jul 15, 2024
Merged

Refactoring of GridViewDataSet #1548

merged 64 commits into from
Jul 15, 2024

Conversation

tomasherceg
Copy link
Member

Another attempt to make GridViewDataSet extensible and loadable on the client side.

@exyi exyi force-pushed the feature/new-datasets branch from 18b3058 to 2ca439b Compare October 7, 2023 11:36
@exyi exyi force-pushed the feature/new-datasets branch from 52a010c to 65fe97f Compare November 19, 2023 20:00
@exyi exyi marked this pull request as ready for review February 29, 2024 21:22
Copy link
Member

@exyi exyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other significant unsolved problems are:

  • The dataset translations will only work in the context of DataSetClientSideLoad, not in ad-hoc staticCommand
  • Async LoadFromQueryable (and the IPagingOptionsLoadingPostProcessor interface), I will make a separate PR for that

src/Framework/Framework/Controls/LinkButton.cs Outdated Show resolved Hide resolved
src/Framework/Core/Controls/GenericGridViewDataSet.cs Outdated Show resolved Hide resolved
(dataSource as IPageableGridViewDataSet<IPagingFirstPageCapability>)?.PagingOptions.GoToFirstPage();
(dataSource as IRefreshableGridViewDataSet)?.RequestRefresh();
}),
new IdBindingProperty($"{this.GetDotvvmUniqueId().GetValue()}_sortBinding")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to simply call the SortChanged without the additional paging+refresh, why is this needed? Since we now have the Button CommandParameters, we wouldn't have to touch the SortChanged binding and we could thus simply allow staticCommands here.

src/Framework/Framework/Controls/DataPager.cs Outdated Show resolved Hide resolved
src/Framework/Framework/Controls/DataPager.cs Outdated Show resolved Hide resolved
src/Tests/ControlTests/DataPagerTests.cs Show resolved Hide resolved
tomasherceg and others added 24 commits April 27, 2024 12:43
who knows if it works...
Creates a nested data context with _index and _collection extension parameters
* introduced symbolic parameters for $gridViewDataSet.loadData function.
   we need to substitute this loadData function on a single element, so
   we cannot use dotvvm-gridviewdataset to change the data context.
* refactored PostbackOptions to a record to allow using `with { ... }` syntax
@exyi exyi force-pushed the feature/new-datasets branch from a2a79a6 to 4fbe3cb Compare April 28, 2024 09:37
/// </summary>
int PageIndex { get; set; }
void GoToNextPage();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer keeping these names because people who built custom pager were probably using these methods.

exyi and others added 2 commits June 20, 2024 17:35
* rename GridViewCommands -> GridViewBindings
* add some doccomments
* moved SortCriterion to MultiCriteriaSortingOptions file
@tomasherceg tomasherceg force-pushed the feature/new-datasets branch from 817bc7c to 6cab06d Compare July 14, 2024 07:42
@tomasherceg tomasherceg merged commit 1c9119b into main Jul 15, 2024
15 checks passed
@tomasherceg tomasherceg deleted the feature/new-datasets branch July 15, 2024 14:20
@exyi exyi added this to the Version 5.0 milestone Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants