如何使用Jquery在asp.net MVC3中创建treeview [英] How to create treeview in asp.net MVC3 using Jquery

查看:73
本文介绍了如何使用Jquery在asp.net MVC3中创建treeview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

MVC3的新手我需要在asp.net mvc3应用程序中使用jQuery创建一个树视图结构。



让我来描述我的场景:我有两个表 - 州和城市。

城市有State_ID作为外键。当我通过State_Id时,我需要在树状结构中显示该州下的所有城市。如果可能的话,你可以给我代码吗。



有什么可以帮我的吗?



谢谢,

Sampath Bejugama。

Hi all,
Am new to MVC3 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 State_Id I need to show all the Cities under that States in a tree structure. If possible can u give me code.

Can any help me on this?

Thanks,
Sampath Bejugama.

推荐答案

我认为这篇文章

http://weblogs.asp.net/mikebosch/archive/2008/11/25/hierarchical-treeview-with-asp-net-mvc-jquery.aspx [ ^ ]

其中一个带有ASP.NET MVC的分层树视图& jQuery被解释,可能对你有所帮助
I think this article
http://weblogs.asp.net/mikebosch/archive/2008/11/25/hierarchical-treeview-with-asp-net-mvc-jquery.aspx[^]
where an Hierarchical Treeview with ASP.NET MVC & jQuery is explained, may be helpful to you


你可以根据层次结构将数据加载到ul-li项目,并使用jsTree插件将其转换为TreeView。



查看以下链接,逐步解释一下您可以下载并查看的工作示例项目。



http://www.techiesweb.net/asp-net-mvc3-tree-view-with -jstree / [ ^ ]
You can load your data to ul-li items based on the hierarchy and use jsTree plugin to convert it to a TreeView.

Checkout the below link explaining it step by step with a working sample project you can download and look into.

http://www.techiesweb.net/asp-net-mvc3-tree-view-with-jstree/[^]


这篇文章可以帮助你。

如何在MVC3中创建TreeView [ ^ ]
May this article help you.
How to Create TreeView in MVC3[^]


这篇关于如何使用Jquery在asp.net MVC3中创建treeview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆