Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
21343 Points
1818 Posts
Microsoft
Apr 09, 2012 08:20 AM|LINK
Hi
You can use the jQuery plugin: TreeView to achieve it.
http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
Add this script in your View:
<script type="text/javascript"> $(document).ready(function () { $('#jQuerytreeview').treeview({ collapsed: true }); $(".city").click(function () { $.ajax({ url: '@Url.Action( MVC.Various.TreeView.GetCity( ) )', data: { cityId: $(this).attr("id") }, type: 'GET', success: function (data) { alert("Selected city: " + data.Name + "); } }); }); }); </script>
Hope this helpful Regards Young Yang
Young Yang -...
All-Star
21343 Points
1818 Posts
Microsoft
Re: How to implement treeview structure using jQuery in asp.net mvc3
Apr 09, 2012 08:20 AM|LINK
Hi
You can use the jQuery plugin: TreeView to achieve it.
http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
Add this script in your View:
<script type="text/javascript"> $(document).ready(function () { $('#jQuerytreeview').treeview({ collapsed: true }); $(".city").click(function () { $.ajax({ url: '@Url.Action( MVC.Various.TreeView.GetCity( ) )', data: { cityId: $(this).attr("id") }, type: 'GET', success: function (data) { alert("Selected city: " + data.Name + "); } }); }); }); </script>Hope this helpful
Regards
Young Yang
Feedback to us
Develop and promote your apps in Windows Store