Issue with property NodeSelected

Hi,

i have a issue with the property NodeSelected of the TreeView component in version 19.4.0.38 in a Blazor Wasm Project.

In my component i have this code:

 <SfTreeView TValue="TValue"

                ExpandOn="ExpandAction.Click">

        <TreeViewEvents TValue="TValue"

                        NodeSelected="@((args)=>{Console.WriteLine("NodeSelected");})">

        </TreeViewEvents>

        <TreeViewFieldsSettings TValue="TValue"

                                Id="@FieldSettings.Id"

                                HasChildren="@FieldSettings.HasChildren"

                                Text="@FieldSettings.Text"

                                ParentID="@FieldSettings.ParentId"

                                DataSource="@FieldSettings.DataSource">

        </TreeViewFieldsSettings>

    </SfTreeView>


If i set the property NodeSelected the TreeView Node not expand with the first click of mouse but a second click is required.


If i remove the rows

 <TreeViewEvents TValue="TValue"

                        NodeSelected="@((args)=>{Console.WriteLine("NodeSelected");})">

  </TreeViewEvents>

All work perfectly and the node is expanded with the first click


Any suggestion to resolve the issue?


Thanks for the support


3 Replies

SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team January 31, 2022 04:22 PM UTC

Hi Luca, 

Greetings from Syncfusion support. 

We suspect that your reported occurs due to the improper TValue properties value attribute in TreeView initialization code. We have prepared a simple sample with your shared TreeView issue code. Your reported problems not occurs to us. 

We have attached our validation sample for your reference. 
 

Also, check out the following links to know more about SFTreeView component. 



Please, let us know if you need any further assistance. 

Regards, 
Shameer Ali Baig S. 



LU Luca February 1, 2022 02:09 PM UTC

Thank, i solved the problem.

Effectively the problem was in TValue and in the properties of TValue.

Thanks for the support!!!


Luca



KR Keerthana Rajendran Syncfusion Team February 3, 2022 05:20 AM UTC

Hi Luca, 

Most welcome. We are glad to hear that the reported issue is resolved. Please get back to us if you need any further assistance. 

Regards, 
Keerthana R. 


Loader.
Up arrow icon