1 Replies - 286 Views - Last Post: 26 November 2012 - 03:28 AM Rate Topic: -----

#1 telmessos  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 31-October 12

How to set 5 variables for each Treeview node

Posted 26 November 2012 - 01:29 AM

Hi all,

I have an XML structure as shown below.

<?xml version="1.0" encoding="ISO-8859-9" ?>
<menuler>
	<gruplar GrupAdi="Formlar">
		<menu MenuAdi="Birinci Menü">
			<bolgekodu>bölge kodu 1</bolgekodu>
			<bolgescriptkodu>bölge script kodu 1</bolgescriptkodu>
			<ustkod>üst kod 1</ustkod>
			<headscriptkodu>head script kodu 1</headscriptkodu>
		</menu>
		<menu MenuAdi="İkinci Menü">
			<bolgekodu>bölge kodu 2</bolgekodu>
			<bolgescriptkodu>bölge script kodu 2</bolgescriptkodu>
			<ustkod>üst kod 2</ustkod>
			<headscriptkodu>head script kodu 2</headscriptkodu>
			<csskodu>css codes here</csskodu>
		</menu>
	</gruplar>
</menuler>


My code reads the XML file and creates a node for each "menu" item. I need to set the values of the child nodes of each menu item, to a variable.

Could you please give me an example or idea how to set the 5 sub items to variables dynamically and how to request them on drag drop of each menu node?

Many thanks

Is This A Good Question/Topic? 0
  • +

Replies To: How to set 5 variables for each Treeview node

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3576
  • View blog
  • Posts: 11,125
  • Joined: 05-May 12

Re: How to set 5 variables for each Treeview node

Posted 26 November 2012 - 03:28 AM

Each TreeViewItem has a Tag property. You can create a class that holds the bits of data that you want to store. See MSDN documentation for an example of using it: http://msdn.microsof...eenode.tag.aspx
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1