We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Null ref exception when customizing a Column / Row

Please see attachment.
One question is about null ref exception when customizing a Column / Row 
And another question is about treegrid mockup attached. Can you suggest a proper strategy to make treegrid more or less to look like that?  

Attachment: treegrid_(2)_aabb3d24.zip

1 Reply

MP Manivannan Padmanaban Syncfusion Team December 16, 2019 09:04 AM

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> 
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:  
    .e-icons.e-treegridcollapse::before { 
        content: '\e913' !important 
    .e-icons.e-treegridexpand::before { 
        content: '\e913' !important 
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 
Manivannan Padmanaban 

Live Chat Icon For mobile
Up arrow icon