Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9155501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:36:31+00:00 2026-06-17T12:36:31+00:00

I am showing data in db by treeview. Every data has its own code

  • 0

I am showing data in db by treeview. Every data has its own code and parent code (not a level). My showing algorithm step is like this

  • Step 1 : find data which parent code is null (Root node)
  • Step 2 : find data which parent code is step 1 (parent of step 1)
  • step 3 : add 1,2 to treeView and show
  • step 4 : when click node, find data which parent code is selected node
  • step 5 : add step 4 as selected code`s child node

node1

└ node2     – click expand icon

  └ node3 

└ node4     – selected node

In this case, I can only check selected node(node4). So If I put a adding child node code in event click or expand/collapse, code is working on selected node(node 4), not a node 2.

This is why I using click event.

I want to check which node`s expand icon was clicked. In this example, what node i want to get is node2.

A ignorant but simple way is well… save all of node’s status and compare before expanded with after. This way will take too long when number of nodes is large.

If there is other simple way to pick a node2, I want to know how I can find it.

Sorry for my poor explanation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:36:33+00:00Added an answer on June 17, 2026 at 12:36 pm

    You can use the OnBeforeExpand event of the treeview. The event has a TreeViewCancelEventArgs argument that carries the node to be expanded in its Node property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my C# code, now it's showing data in console. class PlaceViewModel {
I do not know what is wrong with this code. alert shows that data
I have a repeater for showing my data . this repeater showing 2 field
I want to do something basic like: data-bind=visible: x || y showing if either
My grid isnt showing data when put to tab. This grid, store, model, JSON
I have a UITableView showing data from a plist file. For this table view,
I have an ajax request which is showing data on success. AFTER this is
I have a Treeview showing Xml data where each element is wrapped in a
When showing data from a mysql table on an php page does it have
I have a DataGrid that is showing some data via a PagedCollectionView with one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.