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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

get id node

Thread ID:

Created:

Updated:

Platform:

Replies:

117902 Jan 7,2015 11:53 AM UTC Jan 8,2015 05:58 PM UTC ASP.NET Web Forms 1
loading
Tags: TreeView
MAINAUD Cyril
Asked On January 7, 2015 11:53 AM UTC

Hi,

First, sorry in advance for my english, i'm French and my english is maybe incorrect.

I'm a new user and i have two problems with the TreeView.

My project is in ASP.NET (VB).

1. My TreeView is linked with a database by a SqlDataSourceControl. Why the TreeView is cleared at each PostBack?
I use this method for ListView control (framework Windows) and i don't have this problem.
And if set "EnabledPersistence" at True, data are incorrect!! it's very strange.

2. I have checkboxes in my TreeView. How get the ID list of nodes which are checked??

Regards,

Cyril MAINAUD

Muralishankar Sundaram [Syncfusion]
Replied On January 8, 2015 05:58 PM UTC

Hi Cyril,

Thanks for using Syncfusion controls.

Query 1 -“My TreeView is linked with a database by a SqlDataSourceControl. Why the TreeView is cleared at each PostBack? And if set "EnabledPersistence" at True, data are incorrect!! it's very strange,”

We unable to reproduce the reported issue, so please share the issue reproducing sample or modify the attached sample and share the same with us with detailed steps with us.

Query 2 -“ I have checkboxes in my TreeView. How get the ID list of nodes which are checked??”

Yes, we can get the selected items text while check the node in ‘OnNodeChecked’ server side events. Please refer the below code snippet:

<code>

[ASPX.CS]

Protected Sub sampleTreeview_NodeChecked(sender As Object, e As Syncfusion.JavaScript.Web.TreeViewEventArgs)

        Dim CheckedNodes As ArrayList = TryCast(e.Arguments("currentCheckedNodes"), ArrayList)

        lblChecked.Text = "checked Node List =>"

        For Each sample As String In CheckedNodes

            lblChecked.Text = lblChecked.Text + sample & Convert.ToString("--")

        Next

    End Sub

</code>

Unfortunately we unable to get the id in ‘onNodeChecked’ event, in case if you want to collect the id of checked nodes, please report it as feature using Direct Track account.

We prepared the sample solution with reported scenario and attached in a bellow link:

http://www.syncfusion.com/downloads/support/directtrac/117902/TreeviewSample646934545.zip

Please let me know if you have any concerns.

Regards,

Muralishankar S.



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.

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

;