TreeView - vertical and horizontal scroll bars-from 195679

Thanks for the answer, but I think this solution is not good enough. 

There is another problem now:

I increased the length of the DIV element from 150px to 250px and then the following is obtained:


Picture3.1.png

As you can see, the selected row is not marked for its entire length.

If we expand the 'Australia' node, we get the following:

Picture3.2.png

Again, the selected row is not marked to the end, but the marked length differs from the previous case.

This does not look nice, and the marked part must be the entire length of the DIV element.


8 Replies 1 reply marked as answer

PM Prasanth Madhaiyan Syncfusion Team January 9, 2025 10:37 AM UTC

Hi Aleksandar,


To resolve the scrolling issue, we set the display to inline-table for the TreeView component. However, this set the width of the TreeView component to be based on the content element's width, rather than the width of the parent div element. To ensure the TreeView component occupies the parent div container's width, you need to set the width of the TreeView component to 100%.


Refer to the below code snippet.


<div id="ControlRegion" style="width: 250px; height: 300px; overflow: auto">

    <SfTreeView CssClass="sf-treeview"  TValue="TreeData" AllowEditing="true" AllowDragAndDrop="true" SortOrder="Syncfusion.Blazor.Navigations.SortOrder.None">

        <TreeViewFieldsSettings DataSource="@TreeDataSource" Id="Id" ParentID="Pid" Text="Name" HasChildren="HasChild" Expanded="Expanded"  ></TreeViewFieldsSettings>

    </SfTreeView>

</div>

<br/>

<div>

  <h3>Selected Features:</h3>

    <ul class="ulstyle">

      <li class="list"> Node Editing</li>

      <li class="list"> Drag and Drop</li>

      <li class="list"> Sort Order - None</li>

      <li class="list"> Theme - Fluent</li>

    </ul>

</div>

<br/>

<style>

    #ControlRegion {

        margin: 0 auto;

        border: 1px solid #dddddd;

    }

 

    .sf-treeview {

        display: inline-table;

        width: 100%;

    }

</style>


For your reference, we have attached the sample and screenshots.


Sample: Attached as a zip file.


Screenshots:


Initial rendering

Expanded state


Check out the attached sample and let us know if you need any further assistance.


Regards,

Prasanth Madhaiyan.


Attachment: SyncfusionBlazorApp1_b7469e42.zip

Marked as answer

AL Aleksandar January 10, 2025 12:27 AM UTC

Thank you very much for your assistance. :) 




KG Kalpana Ganesan Syncfusion Team January 10, 2025 12:25 PM UTC

Hi Aleksandar,


You are welcome. Please get back to us for further assistance.


Regards, 

Kalpana.



AL Aleksandar January 12, 2025 09:48 PM UTC

Hi Kalpana. 

Unfortunately, I have noticed one more problem here. 

When I tried drag & drop, during the drag I've got the following:

Picture4.1.png

As you can see, width of the dragged item is huge. 

Tell me how to fix that, please :)


Best regards,

Aleksandar




PM Prasanth Madhaiyan Syncfusion Team January 13, 2025 12:31 PM UTC

Hi Aleksandar,


To resolve the issue of the dragged item having a large width when performing drag-and-drop actions in the Blazor TreeView component, you need to set display: inline-table; and width: auto; for the e-drag-item element.


Refer to the below code snippets:


[TreeViewFeatures.razor]


<style>

    …

    .sf-treeview.e-treeview.e-drag-item {

        display: inline-table;

        width: auto;

    }

</style>


For your reference, we have attached the sample.


Sample: Attached as a zip file.


However, regarding the “Dragged element icons alignment issue in the Blazor TreeView component,” we consider it a bug on our end. The fix for this issue will be included in the Volume 4 SP release, scheduled for the end of January 2025.


You can track the status of the fix through the following link.


Feedback: https://www.syncfusion.com/feedback/64622/dragged-element-icons-alignment-issue-in-the-blazor-treeview-component


Check out the shared details and let us know if you need any further assistance.


Regards,

Prasanth Madhaiyan.


Attachment: SyncfusionBlazorApp1_4609eef3.zip


AL Aleksandar January 16, 2025 07:39 PM UTC

Thank you very much for your effort. This is the solution. :) 



KG Kalpana Ganesan Syncfusion Team January 17, 2025 04:18 AM UTC

Hi Aleksandar,


Glad you got the solution. Please get back to us for further assistance.


Regards,

Kalpana.



PM Prasanth Madhaiyan Syncfusion Team February 5, 2025 06:03 AM UTC

Hi Aleksandar,


We are glad to announce that our Essential Studio® 2024 Volume 4 SP Release v28.2.3 is rolled out and is available for download under the following link.


The issue with the “Dragged element icons alignment issue in the Blazor TreeView component” has been resolved in this release. To access this fix, we suggest you update the package to 28.2.3 and we include the sample in the latest version for your reference.


Sample: Attached as a zip file.


Feedback: https://www.syncfusion.com/feedback/64622/dragged-element-icons-alignment-issue-in-the-blazor-treeview-component


Release notes: https://blazor.syncfusion.com/documentation/release-notes/28.2.3?type=all#treeview


Root Cause: The alignment issue occurred due to the Fluent theme applying an incorrect padding value to the drag icon, which caused it to appear misaligned.


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,

Prasanth Madhaiyan.



Attachment: SyncfusionBlazorApp1_df6e29a9.zip

Loader.
Up arrow icon