[PR #1076] [MERGED] RadzenDataGridColumn: handle non-px widths of frozen columns #2498

Open
opened 2026-01-29 18:19:08 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1076
Author: @Cosmatevs
Created: 7/19/2023
Status: Merged
Merged: 7/25/2023
Merged by: @enchev

Base: masterHead: frozen-column-stack-width-calc


📝 Commits (3)

  • f31e8e0 DataGridColumn: handle non-px widths of frozen columns, simplify css style conditions
  • e32f216 DataGridColumn: simplify calculation of frozen column style
  • b1471ef Merge branch 'master' into frozen-column-stack-width-calc

📊 Changes

2 files changed (+53 additions, -24 deletions)

View changed files

📝 Radzen.Blazor/RadzenDataGridColumn.razor.cs (+52 -23)
📝 RadzenBlazorDemos/Pages/DataGridFrozenColumns.razor (+1 -1)

📄 Description

Before this change, when you set the width of a frozen column using an unit other than px (e.g. 5rem or var(--my-width)) then it will be converted to 200px while calculating how far from the left side a frozen column should be. Here's an example result (in a demo, I've set the first column width to 5rem):
image

After my change:
image

If there are more frozen columns on the left, then the function creates a calc(w1 + w2 + w3…) css expression.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1076 **Author:** [@Cosmatevs](https://github.com/Cosmatevs) **Created:** 7/19/2023 **Status:** ✅ Merged **Merged:** 7/25/2023 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `frozen-column-stack-width-calc` --- ### 📝 Commits (3) - [`f31e8e0`](https://github.com/radzenhq/radzen-blazor/commit/f31e8e0ee9d32401f2fe4e4def6f88b0c2618308) DataGridColumn: handle non-px widths of frozen columns, simplify css style conditions - [`e32f216`](https://github.com/radzenhq/radzen-blazor/commit/e32f216e6be8957d7409f3c8c6e958842fdcd101) DataGridColumn: simplify calculation of frozen column style - [`b1471ef`](https://github.com/radzenhq/radzen-blazor/commit/b1471efcebec8b6065bd99e3c84fad10c978ac91) Merge branch 'master' into frozen-column-stack-width-calc ### 📊 Changes **2 files changed** (+53 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenDataGridColumn.razor.cs` (+52 -23) 📝 `RadzenBlazorDemos/Pages/DataGridFrozenColumns.razor` (+1 -1) </details> ### 📄 Description Before this change, when you set the width of a frozen column using an unit other than px (e.g. 5rem or var(--my-width)) then it will be converted to 200px while calculating how far from the left side a frozen column should be. Here's an example result (in a [demo](https://blazor.radzen.com/datagrid-frozen-columns), I've set the first column width to 5rem): ![image](https://github.com/radzenhq/radzen-blazor/assets/44393502/3a216d76-9cb0-46ec-b84c-85400b3a91e6) After my change: ![image](https://github.com/radzenhq/radzen-blazor/assets/44393502/91e58382-9d05-438d-8e45-894e3f3079a5) If there are more frozen columns on the left, then the function creates a calc(w1 + w2 + w3…) css expression. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:19:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2498