Skip to content

DataPager styling & templating - #1837

Merged
exyi merged 3 commits into
mainfrom
feature/datapager-templating
Jun 12, 2026
Merged

DataPager styling & templating#1837
exyi merged 3 commits into
mainfrom
feature/datapager-templating

Conversation

@tomasherceg

@tomasherceg tomasherceg commented Jul 12, 2024

Copy link
Copy Markdown
Member

DataPager did not have a way to provide custom templates for page numbers, and there was no way to apply CSS classes or other attributes on inner <li> and <a> / <span> elements.

However, there is a bug here - when I use ListItemClass instead of ListItemclass, the attribute is rendered as Class and is not combined with Knockout JS binding css: { "class": something }.

It can be reproduced in ControlSamples/DataPager/DataPagerTemplates sample by changing the casing.

@tomasherceg
tomasherceg marked this pull request as draft July 12, 2024 20:51
@tomasherceg
tomasherceg force-pushed the feature/datapager-templating branch from 67b4d47 to 8c6e824 Compare August 1, 2024 19:31
@tomasherceg
tomasherceg force-pushed the feature/datapager-templating branch from 8c6e824 to d7c726c Compare September 1, 2024 15:54
@tomasherceg
tomasherceg force-pushed the feature/datapager-templating branch from d7c726c to eaf640e Compare August 31, 2025 19:12
@tomasherceg

Copy link
Copy Markdown
Member Author

I tried to track down the issue with ListItemclass vs ListItemClass, and it seems that HtmlWriter doesn't mind when it receives two attributes (class and Class) that differ only by case.

It happily renders both of them, and the browser interprets only the first one.

@tomasherceg
tomasherceg force-pushed the feature/datapager-templating branch from eaf640e to 79ac523 Compare June 12, 2026 10:39
Comment thread src/Framework/Framework/Controls/DataPager.cs Fixed
Comment thread src/Framework/Framework/Controls/DataPager.cs Fixed
Comment thread src/Framework/Framework/Controls/DataPager.cs Fixed
Comment thread src/Framework/Framework/Controls/DataPager.cs Dismissed
Comment thread src/Framework/Framework/Controls/DataPager.cs Dismissed
Comment thread src/Framework/Framework/Controls/DataPager.cs Dismissed
@tomasherceg
tomasherceg marked this pull request as ready for review June 12, 2026 12:33
@exyi
exyi merged commit ebbe896 into main Jun 12, 2026
17 of 18 checks passed
@exyi
exyi deleted the feature/datapager-templating branch June 12, 2026 13:32
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.

2 participants