TreeGrid Guid? as IdMapping and ParentIdMapping

Hello,

should a TreeGrid support a nullable Guid as IdMapping and ParentIdMapping? If so, in my case the whole GUI hangs in the session as soon as a list with a corresponding model is bound as the DataSource. Only refresh via F5 then helps.

5 Replies 1 reply marked as answer

PK Padmavathy Kamalanathan Syncfusion Team August 4, 2020 11:18 AM UTC

Hi Dirk,

Thanks for contacting Syncfusion Forums.

QUERY: should a TreeGrid support a nullable Guid as IdMapping and ParentIdMapping

In Tree Grid, we have support for GUID value as IdMapping and ParentIdMapping. We are unable to reproduce the reported issue at our end. We have created sample for your reference. You can download the same from the below location,

If you face same issue even after referring the above sample, kindly get back to us with the below details, 
 
  1. Complete Tree Grid rendering code(With dummy GUID data)
  2. Video demonstrating the issue
  3. Screenshots of error  with stack trace (if any)
  4. Also share your Product version details
  5. If possible share us issue reproducing sample or reproduce the issue in the sample provided above
Regards,
Padmavathy Kamalanathan



PH Patrik Hermansson December 29, 2020 04:21 PM UTC

Hi

 I think I have found some kind of issues related to using Guids as Id's in the TreeGrid. I downloaded your sample and modified it a bit to reproduce the error. 

 The issue I found is when you try to add a new item at the toplevel. Have attached a zipfile with an short description of the errors (Treegrid - Guids.docx) and two videos describing the errors I have described in the word file and the source code (your Sample-656747257) but updated .



Attachment: Syncfusion__Treegrid_and_guids_91517c36.zip


PK Padmavathy Kamalanathan Syncfusion Team December 30, 2020 02:21 PM UTC

Hi Patrik, 
 
Thanks  for contacting Syncfusion Forums. 
 
Query 1: Script error occurs while adding new record 
 
We have validated your query at our end. We have considered it as a bug and logged report for the same. Thank you for taking time to report this issue "Script error occurs while using GUID and adding new record" and helping us improve our product. Fix for this issue will be included in our bi-weekly release which is expected to be rolled out in 2nd week of January 2021. 
 
You can track the current status of your request, review the proposed resolution timeline and contact us for any further queries through this link, 
 
 
Note: To view the above feedback, kindly login into your account. 
 
Disclaimer: The feedback link is in review state and you can check it once it is validated 
 
Query 2: Could not edit and updated the newly added record 
 
For performing CRUD functionalities properly, we need to set one of the column as “Primary key” column. Please check the below help documentation, 
 
In your sample, you have not set the primary key for any column. We suggest you to set IsPrimaryKey property to true for GUID column in order to resolve the reported issue. 
 
Please check the below code snippet, 
 
 
 
<SfTreeGrid DataSource="@TreeDataSource" IdMapping="Id" ParentIdMapping="ParentId" TreeColumnIndex="1" 
            Toolbar="@(new List<string>() {"Add", "Edit", "Delete", "Update", "Cancel"})"> 
                        IsPrimaryKey="true" 
                        Width="80" 
                        TextAlign="TextAlign.Left" /> 
        ------ 
    </TreeGridColumns> 
</SfTreeGrid> 
 
 
NOTE: Field value should be unique value. 
 
Kindly get back to us for further assistance. 
 
Regards, 
Padmavathy Kamalanathan 


Marked as answer

PH Patrik Hermansson January 1, 2021 05:09 PM UTC

Hi 

Thanks for your help. 

To set the IsPrimary to true solves the problem. 

Thanks!


PK Padmavathy Kamalanathan Syncfusion Team January 4, 2021 05:44 AM UTC

Hi Patrik, 
 
We are glad to hear that your issue has been resolved. 
 
Kindly get back to us for further assistance. 
 
Regards, 
Padmavathy Kamalanathan 


Loader.
Up arrow icon