Click here to Skip to main content
15,887,596 members
Articles / Programming Languages / JScript .NET
Article

JScript Tree Grid Control

Rate me:
Please Sign up or sign in to vote.
4.45/5 (11 votes)
11 Jan 2004 79.6K   1.3K   16   13
Tree Grid control for JScript.

Sample Image - wsGridCtrl.gif

Introduction

This article demonstrates a Tree Grid control for JScript.

How to use

JavaScript
// Create wsGrid Instance
 m_wsGridCtrl = new wsGridCtrl();
 
 // Initialize
 // Param1: width
 // Param2: OnMouseOver Color
 m_wsGridCtrl.initializeDocument(500, "#FF9999");
 // Titles Create
 // Param1: Text
 // Param2: Width
 m_wsGridCtrl.InsTab("Title", "*");
 m_wsGridCtrl.InsTab("Content", "400");
 

 // Insert Item Example
 // Param1: Parent Item
 // Param2: Item. If title is two..
//          you must write two Items. (delimiter is ';')
 // Param3: hyper link (it also delimiter is ';')
 m_wsGridCtrl.InsItem(null, "Menu1;Content1;", 
   "http://yahoo.com;http://google.com;", "_self;_blank;");
 m_wsGridCtrl.InsItem(null, "Menu2;Content2;", 
   "http://yahoo.com;http://google.com;", "_blank;_blank;");
 
 // Sub Item Example
 var iItem = m_wsGridCtrl.InsItem(null, "Menu3;Content3;", 
   "http://yahoo.com;http://google.com;", "_blank;_blank;");
 m_wsGridCtrl.InsItem(iItem, "Menu5;Content5;", 
   "http://yahoo.com;http://google.com;", "_blank;_blank;");
 m_wsGridCtrl.InsItem(null, "Menu6;Content6;", 
   "http://yahoo.com;http://google.com;", "_blank;_blank;");
 m_wsGridCtrl.InsItem(null, "Menu7;Content7;", 
   "http://yahoo.com;http://google.com;", "_blank;_blank;");
  

 // finilly generate code (It is important!)
 m_wsGridCtrl.GenerateCode(); 
 // First state setting (ExpandAllTree or RecudeAllTree)
 m_wsGridCtrl.RecudeAllTree();
// m_wsGridCtrl.ExpandAllTree();

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer
Korea (Republic of) Korea (Republic of)
Computer Programmer

Comments and Discussions

 
Generalanother small change Pin
master.zion7-Jul-09 10:25
master.zion7-Jul-09 10:25 
GeneralThis is a asp.net edition Pin
sherwinzhu2-Oct-08 23:55
sherwinzhu2-Oct-08 23:55 
GeneralYou did a GREAT JOB !!!!!!!! Pin
Cheung Tat Ming25-Oct-07 0:09
Cheung Tat Ming25-Oct-07 0:09 
I am chinese guy who live in HongKong, so forgive my bad english. Smile | :)

2 years ago, i start to create a NNTP(Usenet) application by ASP.NET,

and i need to bind the article from TCP Stream to treelist / treegrid (just like the outlook express inbox)

i search all around yahoo & google, i cannot find any Free & open-source DHTML or ASP.NET control to

work ,so i build my own with asp.net datagrid & repeater control. But unfortunately it make me hard to

development.so i give up this project.

Today, i pick up this project again, and i wonder is it any free treegrid stuff have been release in

this 2 years, finally, i found your one!

It's simple code but reliable, it's good for create dyncmic hyperlink from database, that's is what

i seeking in this 2 years.

so i can build my own nntp application again.

You did a great Job!!! I believe it many developer need your TreeGrid!!Blush | :O

Blush | :O
GeneralThis is exactly what I needed Pin
BigJoe7141-Jun-07 4:31
BigJoe7141-Jun-07 4:31 
GeneralRe: This is exactly what I needed Pin
Cheung Tat Ming25-Oct-07 0:11
Cheung Tat Ming25-Oct-07 0:11 
GeneralSmall Bug Pin
ilikeopensource23-May-07 8:11
ilikeopensource23-May-07 8:11 
AnswerRe: Small Bug Pin
BigJoe7141-Jun-07 4:29
BigJoe7141-Jun-07 4:29 
GeneralRe: Small Bug Pin
joepen26-Jan-09 16:02
joepen26-Jan-09 16:02 
QuestionDynamic Items Pin
manugoel200313-Sep-06 0:34
manugoel200313-Sep-06 0:34 
GeneralGreat script Pin
timothymm3-Apr-06 7:57
timothymm3-Apr-06 7:57 
GeneralDynamic include Item. Pin
leandronardo5-Jul-05 3:34
leandronardo5-Jul-05 3:34 
GeneralVery Slick! Pin
DFU2320-Jan-04 3:38
DFU2320-Jan-04 3:38 
GeneralRe: Very Slick! Pin
Jong-Ha Ahn22-Jan-04 13:42
Jong-Ha Ahn22-Jan-04 13:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.