| |

VerySource

 Forgot password?
 Register
Search
View: 1328|Reply: 3

How to realize fast query of data in treeview

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-12-16 17:00:01
| Show all posts |Read mode
I am currently solving a problem, which is how to achieve the following situation:
A
A1
  A11
A2
  A21
  A22
A3
B
B1
  B11
   B111
.......
Z
There are 7 levels of relationship, I would like to ask, how to quickly realize the query?
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-12-20 16:45:01
| Show all posts
This depends on whether the thing you are looking for is regular. If not, there is no good way. Just like your example, if there is a regularity, you can decompose the string you are looking for. How many bits represent which LEVEL of the Treeview. Then return to the obtained index to continue to check, here recursive method. But the query is one-way in depth. No need to traverse all!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-12-21 23:30:01
| Show all posts
Use Treeview.select.text as a conditional query
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-12-21 23:45:01
| Show all posts
Specify SortType first, and then use dichotomy to find
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list