Click here to Skip to main content
11,495,524 members (66,745 online)
Click here to Skip to main content

JScript Tree Grid Control

, 11 Jan 2004 67.2K 1.2K 16
Rate this:
Please Sign up or sign in to vote.
Tree Grid control for JScript.

Sample Image - wsGridCtrl.gif

Introduction

This article demonstrates a Tree Grid control for JScript.

How to use

// 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

Share

About the Author

Jong-Ha Ahn
Software Developer
Korea (Republic Of) Korea (Republic Of)
Computer Programmer

Comments and Discussions

 
Generalanother small change Pin
master.zion7-Jul-09 11:25
membermaster.zion7-Jul-09 11:25 
GeneralThis is a asp.net edition Pin
sherwinzhu3-Oct-08 0:55
membersherwinzhu3-Oct-08 0:55 
GeneralYou did a GREAT JOB !!!!!!!! Pin
SilverNight25-Oct-07 1:09
memberSilverNight25-Oct-07 1:09 
GeneralThis is exactly what I needed Pin
BigJoe7141-Jun-07 5:31
memberBigJoe7141-Jun-07 5:31 
GeneralRe: This is exactly what I needed Pin
SilverNight25-Oct-07 1:11
memberSilverNight25-Oct-07 1:11 
GeneralSmall Bug Pin
ilikeopensource23-May-07 9:11
memberilikeopensource23-May-07 9:11 
AnswerRe: Small Bug Pin
BigJoe7141-Jun-07 5:29
memberBigJoe7141-Jun-07 5:29 
GeneralRe: Small Bug Pin
joepen26-Jan-09 17:02
memberjoepen26-Jan-09 17:02 
QuestionDynamic Items Pin
manugoel200313-Sep-06 1:34
membermanugoel200313-Sep-06 1:34 
GeneralGreat script Pin
timothymm3-Apr-06 8:57
membertimothymm3-Apr-06 8:57 
GeneralDynamic include Item. Pin
leandronardo5-Jul-05 4:34
memberleandronardo5-Jul-05 4:34 
GeneralVery Slick! Pin
D2F3U20-Jan-04 4:38
memberD2F3U20-Jan-04 4:38 
GeneralRe: Very Slick! Pin
whitespray22-Jan-04 14:42
memberwhitespray22-Jan-04 14:42 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150520.1 | Last Updated 12 Jan 2004
Article Copyright 2004 by Jong-Ha Ahn
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid