在ASP.NET MVC3中使用jQuery创建Treeview结构

问题描述:

我需要在asp.net mvc3应用程序中使用jQuery创建树形视图结构.

让我描述一下我的情况:我有两个表-省和城市.
城市将State_ID作为外键.当我传递StateId时,我需要以树状结构显示该状态下的所有Citie.

有什么可以帮助我的吗?感谢您提供的所有帮助.

谢谢,
Sampath Bejugama.

I need to create a treeview structure using jQuery in asp.net mvc3 applicatiopn.

Let me describe my scenario: I have two tables - States and Cities.
Cities has State_ID as foreign key. When I pass the StateId I need to show all the Citie under that States in a tree structure.

Can any help me on this? Thanks for all help in prior.

Thanks,
Sampath Bejugama.



检查 [ [
Hi,

Check this[^] article.
You can find example with tree view.

The main idea is to make an object model for your data, fill it with real data and then create JSON structure that can be used to render tree view structure. Check this[^] treeview jQuery plugin.