Click node text to expand/collapse instead of +/- icon in asp.net treeview

Advertisement
 On a treeview, we can collapse and expand the nodes by clicking the +/- icon. I want to be able to click
the node text to achieve the same results.

We can achieved by using node Id's dynamically and setting the selection node Expand statically.

For Dynamic Treeview, we can implement select action by using node id's.

Example:

   TreeNode.SelectAction = TreeNodeSelectAction.Expand;
 
   Listnode.SelectAction = TreeNodeSelectAction.Expand;


 For static Treeview, We can easily achieved by setting the "selectaction="Expand"" to the Treenode

Example:

<asp:TreeView ID="TVID" runat="server">

  <Nodes>

    <asp:TreeNode Text="Content" SelectAction="Expand">

        <asp:TreeNode Text="Main" SelectAction="Expand">
        
          <asp:TreeNode Text="SharePoint" SelectAction="Expand">
              <asp:TreeNode Text="SharePoint2013"/>
              <asp:TreeNode Text="SharePoint2010"/>
              <asp:TreeNode Text="SharePoint2007"/>
           </asp:TreeNode>

          <asp:TreeNode Text=".Net" SelectAction="Expand">
              <asp:TreeNode Text="4.0"/>
              <asp:TreeNode Text="3.5"/>
              <asp:TreeNode Text="3.0"/>
           </asp:TreeNode>

        </asp:TreeNode>

   </asp:TreeNode>

  </Nodes>

</asp:TreeNode>


By using JavaScript

http://geekswithblogs.net/rajiv/archive/2006/03/16/72575.aspx


SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM
Advertisements
SHARE

Lakshmi Tulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

27 comments:

  1. This is additionally a fairly excellent post that individuals undoubtedly appreciated studying. Definitely not everyday which usually take pleasure in the odds to discover a merchandise.Click Here

    ReplyDelete
  2. I am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here. Text Marketing Autoresponder

    ReplyDelete
  3. Thanks for sharing the info, keep up the good work going.... I really enjoyed exploring your site. good resource..home depot survey

    ReplyDelete
  4. Hope you will keep on offering good content like this more often. I feel more and more people should know about this. Also, I agree on most of the points you have made.best charcoal grill india

    ReplyDelete
  5. Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. More information

    ReplyDelete
  6. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Visit her

    ReplyDelete
  7. This short description of CTFO gives you some idea of what the company does: ---
    Changing The Future Outcome also known as CTFO is a reputable (MLM) multi level marketing business in the CBD Oil niche. The primary reason behind their fast growth is that they provide some of the best CBD products in the marketplace. They also provide the products at a low cost for their associates and consumers. Considering that the CBD niche is growing faster and faster every year, it's easy to see why the CTFO network marketing company is growing so fast.CTFO Canada

    ReplyDelete
  8. Das Team von Versicherungsmakler Kassel verbindet diedigitalen Vorteile der Onlinewelt mit der persönlichen Beratung beim Kunden, so
    wie Sie es bis jetzt kennen in Kassel und der Umgebung.Für die Beratung werden sehr umfangreiche Softwareprogrammefür die Ausarbeitung der Ziele und Wünsche unserer Kunden eingesetzt. Diese
    Ausarbeitungen werden in persönlichen Beratungsterminen besprochen. Vorab
    werden die Wünsche und die Bedürfnisse der Kunden besprochen.Mit einer großen Auswahl von Berufsunfähigkeits Versicherungwerden Ihre individuelle Situation in der Beratung berücksichtigt. Sie können sich gegen mit Berufsunfähigkeit, der SchwerenKrankheiten Versicherung und gegen:Krebs, Schlaganfall, Demenz, Alzheimer, Multiple Sklerose Gutartiger Gehirntumor,
    Gutartiger Rückenmarkstumor, Herzinfarkt, Bypass-Operation am Herzen,
    Erkrankung des Herzmuskels (Kardiomyopathie), Herzstillstand, Operation zur
    Korrektur eines Herzfehlers, Ersatz oder Korrektur einer Herzklappe,
    Erkrankungen und Schädigungen des zentralen Nervensystems, Kinderlähmung /
    Polio absichern.Wir sind die Experten für die Schwere KrankheitenVersicherung in Kassel und der Umgebung. Das Team von Versicherungsmakler KasselEnglisch:The team ofinsurance brokers Kassel combines the digital advantages of the online world
    with personal advice to customers, as you know it up to now in Kassel and the
    surrounding area.For theconsultation very extensive software programs are used for the elaboration of
    the goals and wishes of our customers. These elaborations are discussed in
    personal consultation appointments.You can takeout insurance against occupational disability, serious illnesses and against:
    cancer, stroke, dementia, Alzheimer's, multiple sclerosis, benign brain tumor,
    benign spinal cord tumor, heart attack, bypass surgery on the heart, disease of
    the heart muscle (cardiomyopathy), cardiac arrest, surgery to correct a heart
    defect Secure, replace or correct a heart valve, diseases and damage to the
    central nervous system, polio.We are expertsin serious illness insurance in Kassel and the surrounding area.Schwere Krankheiten Versicherung Kassel

    ReplyDelete
  9. This High Temperature Aging Chamber is widely applied for automotive parts ,electronic and electric products ,components and materials by constant high temperature reliability test.High Temperature Aging Environmental Test Chamber

    ReplyDelete
  10. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. click here

    ReplyDelete
  11. These you will then see the most important thing, the application provides you a website a powerful important internet page: Click here

    ReplyDelete
  12. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.More on past questions hub

    ReplyDelete
  13. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.Visit website

    ReplyDelete
  14. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.Textnew post from kitchenscity.com

    ReplyDelete
  15. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.crypto

    ReplyDelete
  16. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.boyumlaw.com

    ReplyDelete
  17. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.binaryoptionsdemo

    ReplyDelete
  18. This is a great article. I am enjoying reading your well-written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.moneygrower.co.uk

    ReplyDelete
  19. { Otherwise, {you can|you are able to|it is possible to|you'll be able to} directly ask Pay - Pal {or other|or any other|or another|and other} {methods to|techniques to|solutions to|ways to} {help you|assist you to|enable you to|allow you to} on phone or through remote desktop software| Some things {to look|to appear|to check|to take a look} out for {are the|would be the|will be the|include the} {availability of|accessibility to|option of|use of} direct {phone numbers|telephone numbers|cell phone numbers|numbers}, instant messaging support, and direct emails| You will never {know exactly|know precisely|understand specifically|specifically} that {what type of|which kind of|what sort of|which} client {you are|you're|you might be|you happen to be} handling {and you have|and you've got|plus you've got|along with} to be prepared {and have|and also have|and possess|and still have} some {bunch of|couple of|few|lot of} {ideas to|suggestions to|tips to|tricks to} {make out|write out|find out|figure out} the solutions pdf data entry services

    ReplyDelete
  20. Hello friend ! Glad to find this "cool" blog or how do you internet people say it. :-) I am really interested in your books, I sure will read some of them. Would you like to talk more about Othello and share thoughts with me ? You can visit my blog as well. Its herereadme pakistan

    ReplyDelete
  21. Thank you very much for writing such an interesting article on this topic. This has really made me think and I hope to read more.livrare flori cluj

    ReplyDelete
  22. Very nice blog and articles. I am realy very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post.
    followpc.com

    ReplyDelete
  23. I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You.Wild Rift Tier List

    ReplyDelete
  24. Nice blog, mutualfundwala provides complete guide and details of Mutual Fund and their investment schemes.The Art of War Quotes

    ReplyDelete
  25. I read that Post and got it fine and informative. Please share more like that... More

    ReplyDelete
  26. I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me.Flori cluj

    ReplyDelete
  27. I loved the content and bookmarked it for future read. Wild Rift Champions Tier List on Techfornerd

    ReplyDelete

Labels

.Net Interview Questions add custom button in sharepoint using javascript Add custom column property into a PageLayout in SharePoint Add Page Title on their browser's title bar in SharePoint Customly add zip files in blogger Add-SPOSiteCollectionAppCatalog : Must have Manage Web Site permissions or be a tenant admin in order to add or remove sites from the site collection app catalog allow list Advance SmartObject An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL. Angular 2 Angular JS Angularjs Angularjs 1 anonymous users accessing lists and libraries App Permissions for SharePoint 2013 asp.net membership unique email Asp.net TreeView Control asp.net. Attendees in SharePoint Auto refresh list using Content Editor WebPart in SharePoint 2013. Auto Refresh SharePoint list using JavaScript Block and unblock of attachment types in SharePoint Blogger C# Callouts in SharePoint 2013 Cascading Dropdown list in SharePoint change onenote to another location. change SuiteBarLeft in SharePoint 2013 check if userid exists in database c# click node text to expand/collapse in Treeview client object model Close webpart CQWP crate chart using BI site in PPS Create a modern team site collection in SharePoint online Create BI chart in PPS SharePoint 2013 create filter in dashboard designer. create kpi's in dashboard designer create kpi's in SharePoint 2013 dashboard designer Create List Create List In SharePoint Create List using Power Shell Script Create Lookup Field in List using Power Shell Script Create lookup field in List create SharePoint List custom view. create SharePoint List views in List Schema create site collection in site collection in SharePoint using powershell created Date Time calculated field in SharePoint Cross site Collection in SharePoint 2013 Crud Operation in Asp.net Using Stored Procedure Custom MasterPage Approval in SharePoint custom view for survey list Customly add SharePoint List view in Page. delete items in sharepoint using powershell Difference between Angular 1.x & Angular 2 difference between Office 365 and Windows Azure difference between Windows Azure and Office 365 in sharepoint? DifferenceBetween discussion board Display Data in Grid View display radio buttons and choice fields horizontally in SharePoint 2013 Document library DotNet Drag and drop documents in document library in SharePoint dynamically populating values from one list to another list using jquery in sharepoint edit and delete buttons in datagridview Edit Links email notification using Nintex enable anonymous access in SharePoint 2013 enable app catalog sharepoint online site collection powershell Enable appcatalog site collection level using PowerShell based on Input file Enable versions for list and library except the hidden lists using PowerShell Script Error occurred in deployment step 'Recycle IIS Application Pool': Cannot resolve model for the project package Errors&Solutions Export document library in sharepoint using powershell Export particular Group in Term Store Management in SharePoint 2013 Export to Excel first release Flow Flow features free disk space on servers using powershell Friendly URLs and Managed Navigation in SharePoint 2013 get a list of site collection with template in web application using PowerShell Script in SharePoint Get attachments in SharePoint custom list using c# get current list item id sharepoint programmatically Get current url using jquery Get data from SharePoint list using Rest api & Angular JS Get Random Get Random SharePoint items using PowerShell Get Random values from SharePoint list using PowerShell Get url of the last value using jquery Get-SPOSite : The managed path sites/yoursitename is not a managed path in this tenant. Getting Email From User Hide “Edit Links” in left navigation SharePoint 2013 hide button in sharepoint based on permissions Hide column in SharePoint List view hide fields using client side object model Hide list in Quick Launch in SharePoint using PowerShell How to add Custom Tiles to SharePoint site Page. How to add extension files in Search Navigation in SharePoint 2013 How to Add Multiple users Using SharePoint People Picker How to add SharePoint list view in Page using C# How to Approve MasterPage using PowerShell in SharePoint How to bind Multiple users Using SharePoint People Picker how to change indicators on kpi performance how to check if an email address already exists in the database in asp.net how to configure workflow manager platform for SharePoint 2013 how to create calculated value using powershell how to create certificate in SharePoint How to create flow. how to create gantt chart webpart in sharepoint how to create KPI indicators in Dashboard designer How to create moden communication site in SharePoint online How to create Multi selected filter in Dashboard How to create nintex workflow in sharepoint how to create rdlc reports in asp.net How to Display Data Grid View in ASP.net How to enable anonymous access in SharePoint How to find data in datagridview in c# How to get image names from the folder using C# how to get particular list content type id in SharePoint 2013 How to get QueryString value in SharePoint WebPart Programatically how to get the current item id for newly created item using REST API and JQuery how to hide list in sharepoint how to know who created list in sharepoint How to make a Site Collection Read-Only in SharePoint 2010 How to overlay Office 365 shared calendar on SharePoint Site how to pass jquery value to asp.net textbox control How to pass pagename as a browser's title bar in the page how to remove unused Application Pool in SharePoint how to remove zone using powershell script How to send mail to particular group of people using PowerShell how to update modified by and created by using powershell how to uplaod RAR files in blogger import csv data into sharepoint import data using powershell Import group to term store management using SharePoint 2013. InfoPath InfoPath Cascading Dropdown list Insert update delete in datagridview in C# winforms Integration from SharePoint to k2. K2 Smart Forms for SharePoint JavaScript Injection jquery K2 blackpearl K2 Designer K2 Designer Workflow. K2 smartform cascading dropdown list k2 Workflow K2 workflow to send a mail with PDF left navigation Local Term Set in managed meta data Managed meta data navigation in SharePoint 2013 Managed metadata service in SharePoint 2013. Managed Navigation in SharePoint 2013. Managed Promoted Sites. meta data navigation Microsoft Flow New Features New-SPConfigurationDatabase The user does not exist or is not unique NintexWorkFlow Office 365 OneNote overwrite existing document in sharepoint using javascript PDF Converter PDF Method in K2 Performance Point Service in SharePoint 2013 PerformancePoint Services Configurtion PerformancePoint Services Configurtion for SharePoint 2013 PerformancePoint Services in SharePoint Server 2013 Popularity trends in SharePoint 2013 Pages populate dropdown list dynamicallyusing jquery Power Shell Power shell script to get SharePoint site size. powershell read xml PowerShell Script PowerShell script to get list of users from SharePoint groups PowerShell Scripts in SharePoint 2013 Powershell to set the masterpage in SharePoint Promoted Links Promoted Sites psconfig.exe quick launch Rdlc reports Readonly Column in SharePoint Editview Realtime DotNet Interview Questions Recent Dotnet interview questions Recent SharePoint interview questions recover deleted OneNote page. OneNote content is missing Regional Settings in SharePoint 2013 Replace New Item text in SharePoint Rest API Schedule PowerShell Script Search in SharePoint 2013 Search navigation in SharePoint 2013 Secure store service SecureStore Services SecureStore Services configuration for SharePoint 2013 self-signed certificate on IIS Server Send email to members of SharePoint Group using PowerShell sharepint2010 sharepoin2010 SharePoint 2013 SharePoint 2010 SharePoint 2013 SharePoint 2013 Dashboard Designer SharePoint 2013 features SharePoint 2013 Interview Questions SharePoint 2013. SharePoint 2013.disable views from user to create SharePoint 2013.Power shell SharePoint 2013.SharePoint 2010 SharePoint 2016 SharePoint Administration SharePoint Alerts and Reminders SharePoint App Configuration SharePoint Apps SharePoint Bulk upload SharePoint Calculated field SharePoint Calendar View sharepoint interview questions SharePoint online training SharePoint Onprem vs Online SharePoint RealTime Online Training SharePoint2010 SharePoint2013 SharePoint2016 SharePointInterview SharePointOnline SharePointOnline;Restore deleted site;SharePoint 2013 show data in datagridview in C# Simple Insert update Delete Retrieve Clear in asp.net. Site Collection Operations in SharePoint 2013 Site Collection Read-Only in SharePoint 2013 site contents Sorting & Filtering SPSite Site Collection Operation parameters in SharePoint 2013 Step by step to create rdlc report in .Net Store names in text files in C# Sub site Subsite Term store management. The server was unable to save the form at this time. please try again UI New look update created by using client side object model update field values in SharePoint using powershell update items in SharePoint list using client object model update modified by field using client side object model upload zip files in blog use IsNullOrEmpty in PowerShell VirtoSoftware VirtoSofware vitrosoftware WebParts what is Document Set in SharePoint 2010 What is Filter in SharePoint Dashboard what is Limited-access user permission lock down mode feature What is Modern Team site What is Target Audience in SharePoint Who Created Site Using PowerShell Workflow in SharePoint 2013 Workflow management platform in SharePoint 2013 Workflow manager for SharePoint 2013 XSL-Template.