introduction to interop: some good article from net

I was looking for some good tutorial on net for com interop, i got following nice articles:
http://msdn.microsoft.com/en-us/library/kew41ycz%28VS.71%29.aspx

http://radio.weblogs.com/0105852/stories/2002/11/14/introductionTonetComInterop.html


http://msdn.microsoft.com/en-us/magazine/cc163494.aspx

http://www.15seconds.com/Issue/040721.htm

Advertisements
Published in: on January 20, 2010 at 12:30 pm  Leave a Comment  
Tags: , , , ,

ExtJS Tips: How to check/unceck all the nodes of a tree(Ext.tree.TreePanel)

This post will help you to achieve following:

  1. Checking/Unchecking all the nodes of a tree.
  2. Checking/Unchecking all the childnodes of a node.
  3. Checking/Unchecking all the siblings of a node.(see comments..)

If you want to check/uncheck all the node of a tree or all the child node of a parent node then following is the way to acheive it:

//function to check/uncheck all the child node.
function toggleCheck(node,isCheck)
{
 if(node)
 {
 var args=[isCheck];
 node.cascade(function(){
 c=args[0];
 this.ui.toggleCheck(c);
 this.attributes.checked=c;
 },null,args);
 }
}
//this will also affect the passed parentNode(node).

Now calling this function for checking/unchecking all the node of a tree:

<br />
var tree=//ext js tree.<br />
toggleCheck(tree.root,true);//for checking all the nodes<br />
//or<br />
toggleCheck(tree.root,false);//for unchecking all the nodes<br />

Now calling above function for checking/unchecking all the children of a node:

<br />
var parentNode=//a node from tree.<br />
toggleCheck(parentNode,true);//for checking all the child nodes<br />
//or<br />
toggleCheck(parentNode,false);//for unchecking all the child nodes<br />

If you find any error or face any difficulty please let me know by comments.

Published in: on January 18, 2010 at 11:22 am  Comments (18)  
Tags: , ,