Enhance QuickGrid by Exposing Column Metadata for Extensibility#66994
Draft
vendasankarsf3945 wants to merge 1 commit into
Draft
Enhance QuickGrid by Exposing Column Metadata for Extensibility#66994vendasankarsf3945 wants to merge 1 commit into
vendasankarsf3945 wants to merge 1 commit into
Conversation
Contributor
|
Thanks for your PR, @vendasankarsf3945. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Author
|
@dotnet-policy-service agree company="Syncfusion, Inc." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhance QuickGrid by Exposing Column Metadata for Extensibility
Description
Exposed the protected
Columnsproperty onQuickGrid<TGridItem>to allow derived classes to access the column list.The
_columnslist was previously private, preventing developers from creating custom grid components that inherit fromQuickGridand need to enumerate columns (e.g., for CSV export functionality).Before:
The
_columnsfield inQuickGrid.razor.cswas marked as private, which meant developers building custom grid components that inherit fromQuickGridcould not access the column list. This prevented implementing features like CSV export where the component needs to read column headers to build the export file.For example, when building an exportable grid component that overrides
QuickGridto add CSV export functionality, the derived class had no way to enumerate the defined columns because_columnswas private.After:
The
Columnsproperty is now declared as protected, returning anIReadOnlyList<ColumnBase<TGridItem>>. This allows any class that inherits fromQuickGrid<TGridItem>to access the list of columns and retrieve properties likeTitlefor each column.With this change, developers can now create derived classes that implement CSV export by iterating over
Columnsand reading theTitleproperty of each column to build the header row of the export file.Fixes #45398