Closed NJashwanth closed 2 weeks ago
Hi @NJashwanth ,
Based on the provided information, you need to group rows within a row. In SfDataGrid, you achieve this behavior by utilizing custom grouping to group the list rows under the required group. We have attached a sample and code snippets for your reference. Please consult the provided sample for more information.
Regarding considering the group title row as a row, currently, DataGrid does not support this feature. However, we have acknowledged your request and have it marked as a potential feature for implementation. During the planning stage of each release cycle, we assess all open features and prioritize them based on various factors such as product vision, technological feasibility, and customer interest. We appreciate your patience and understanding in the meantime. For further details, you can follow up using the feedback provided below.
Feedback link: 53098
Regards, Abinesh P
Hi @abineshPalanisamy Could you also consider making the ColumnGroup widget accept a widget as its child (because as the OP mentioned it only supports having the group name as a string right now)
Hi @andrewwahid ,
Based on the information provided, it seems that you want to allow widgets in the ColumnGroup. In SfDataGrid, we retrieve the cell value based on the column name and perform grouping based on the cell value in the corresponding columns. Therefore, we can't consider widgets for grouping. Additionally, if you need to showcase widgets in the caption summary row, you can override the DataGridSource.buildGroupCaptionCellWidget method. Please refer to the following user guide documentation links for a deeper understanding.
UG link - Grouping
Additionally, We have attached code snippets for your reference.
@override
Widget? buildGroupCaptionCellWidget(
RowColumnIndex rowColumnIndex, String summaryValue) {
// Provide the required widget to display.
return Container(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 15),
child: Text(summaryValue));
}
Regards, Abinesh P
Hi @NJashwanth,
We suspect that the reported issue has been resolved at your end. We are closing this ticket now. If you need any further assistance, you can reopen this issue. We are always happy to help you.
Regards, Ashok K
Hi, I am reaching out regarding a feature inquiry for our project's data grid implementation. I am currently working on incorporating a data grid component that supports grouping rows within a row, allowing for expandable and collapsible functionality.
I'm currently using SfDataGrid , which offers a feature called grouping. However, I encountered a limitation with this feature. While it allows grouping using column names or custom logic, the group name is restricted to a string format. This presents a challenge for my specific use case, as I require the ability to group rows within a row, where the group title itself is also a row.
To provide a visual representation of my scenario, I have attached an image for reference.
Given this requirement, I am seeking guidance on whether it is possible to achieve this functionality within our current project setup. Specifically, I would like to inquire if there are any existing methods or workarounds that would allow for grouping rows within a row, with the group title also being represented as a row.