Thanks for contacting Syncfusion support.
Query: “Null ref exception when customizing a Column / Row”
We checked in our sample by customizing a row using rowDataBound event, but we didn’t face any exception in our sample.
Find the code example:
<EjsTreeGrid ID="checklist" @ref="_treeGrid" Toolbar="@Toolbar" IdMapping="Id" ParentIdMapping="ParentId" DataSource="Checklist" TreeColumnIndex="1" Width="100%">
<TreeGridEvents RowDataBound="rowdataBound" TValue="ChecklistModel"></TreeGridEvents>
<TreeGridColumns>
---------------------
</TreeGridColumns>
</EjsTreeGrid>
---------------------------------------
private void rowdataBound(Syncfusion.EJ2.Blazor.Grids.RowDataBoundEventArgs<ChecklistModel> args)
{
if (args.Data.Id == 278)
{
args.Row.SetAttribute("style", "background-color:#336c12");
}
} |
To find the root cause of an issue, please share the following details
1. Share the code example of Customize the Column/Row
2. Share the DLL version details of Syncfusion.EJ2.Blazor.
Query: “Treegrid mockup”
Based on your attached screenshot, we suspect that you need to change the expand/collapse icon in TreeGrid. To achieve this, we suggest you to use below external style. Using this style we can change the expand/collapse icon.
Find the code example:
<style>
.e-icons.e-treegridcollapse::before {
content: '\e913' !important
}
.e-icons.e-treegridexpand::before {
content: '\e913' !important
}
</style> |
If we misunderstood your query, please get back to us with more details regarding your requirement. For your convenience we have attached the sample and please download the sample from the following link
Regards,
Manivannan Padmanaban