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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Null ref exception when customizing a Column / Row

Thread ID:

Created:

Updated:

Platform:

Replies:

149935 Dec 15,2019 01:05 PM UTC Dec 16,2019 02:04 PM UTC Blazor 1
loading
Tags: TreeGrid
Dan Cheremisinov
Asked On December 15, 2019 01:05 PM UTC

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

Manivannan Padmanaban [Syncfusion]
Replied On December 16, 2019 02:04 PM UTC

 
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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon