Click here to Skip to main content
15,918,108 members
Home / Discussions / Web Development
   

Web Development

 
Questiondefine shortcut keys in web applications Pin
Member 55690225-Oct-05 21:48
Member 55690225-Oct-05 21:48 
AnswerRe: define shortcut keys in web applications Pin
minhpc_bk26-Oct-05 5:04
minhpc_bk26-Oct-05 5:04 
QuestionWe provide total BPO Project and Project management consultancy Pin
vchandra25-Oct-05 19:58
vchandra25-Oct-05 19:58 
AnswerRe: We provide total BPO Project and Project management consultancy Pin
Christian Graus26-Oct-05 10:05
protectorChristian Graus26-Oct-05 10:05 
QuestionTrouble with IE Treeview control Pin
raj42025-Oct-05 19:32
raj42025-Oct-05 19:32 
AnswerRe: Trouble with IE Treeview control Pin
minhpc_bk26-Oct-05 5:04
minhpc_bk26-Oct-05 5:04 
GeneralRe: Trouble with IE Treeview control Pin
raj42027-Oct-05 2:46
raj42027-Oct-05 2:46 
GeneralRe: Trouble with IE Treeview control Pin
minhpc_bk27-Oct-05 16:36
minhpc_bk27-Oct-05 16:36 
+ First of all, you need to define a method to change status of the checkbox of all children, and basically this method is called recursively:

function doChildrenCheckboxClick(parentNode)
{    
    var col = parentNode.children.tags("treenode");
    for (var i = 0; i < col.length; i++)
    {
		doChildCheckboxClick(col[i]);
		if(col[i].children.tags("treenode").length>0)
		{
			doChildrenCheckboxClick(col[i]);
		}		
    }

}          
        
function doChildCheckboxClick(childNode)
{           
   childNode.Checked = childNode.checked = childNode.parentElement.Checked;
    var evt = createEventObject();
    evt.treeNodeIndex = getNodeIndex(childNode);
    g_nodeClicked = childNode;
    
    if(childNode.subtree){
		var cb = childNode.subtree.all.item("_cb", 0);
        cb.setAttribute("checked", childNode.Checked, 0);
	}
	          
	//You should fire a custom event here to so that at the server side you can handle the event
	//and set the Checked property of the treenode accrodingly.
}
+ In the event handler checkboxClick, you can simply call the doChildrenCheckboxClick method:

function checkboxClick()
{
    ...
           
    doCheckboxClick(el);
           
    doChildrenCheckboxClick(el);
             
    fireQueuedEvents();
}
+ Also, in the doCheckboxClick method, you should update the code a bit:

...
//Replace this line with the new one.
//el.checked = !el.checked;
el.Checked = el.checked = !el.Checked;
....
+ There is one thing remained though, the status of the checkbox will not be persisted at the server side, so as I comment in the doChildCheckboxClick method, you need to define a custom event in the .htc file like the oncheck, onexpand... Then you should fire this custom event to notify about this status change of the treenode's checkbox. In the source code of the TreeNode class, you need to provide a snippet of code to process this custom event. For more information, you can have a look at the implementation of other events, and do the same.
GeneralRe: Trouble with IE Treeview control Pin
raj42027-Oct-05 19:54
raj42027-Oct-05 19:54 
QuestionHTML Image or ASP:ImageButton inside a datalist causing a postback Pin
K.P.Kannan25-Oct-05 18:29
K.P.Kannan25-Oct-05 18:29 
AnswerRe: HTML Image or ASP:ImageButton inside a datalist causing a postback Pin
minhpc_bk26-Oct-05 5:02
minhpc_bk26-Oct-05 5:02 
QuestionApplication root in CSS? Pin
Anonymous25-Oct-05 8:12
Anonymous25-Oct-05 8:12 
AnswerRe: Application root in CSS? Pin
Edbert P25-Oct-05 19:52
Edbert P25-Oct-05 19:52 
AnswerRe: Application root in CSS? Pin
dwatkins@dirq.net26-Oct-05 10:10
dwatkins@dirq.net26-Oct-05 10:10 
Questionpaint problem Pin
llp00na25-Oct-05 3:00
llp00na25-Oct-05 3:00 
QuestionCSS: HTTP 500 Internal Server Error? Pin
hrdegroot24-Oct-05 23:44
hrdegroot24-Oct-05 23:44 
QuestionSQL Writable Data Pin
Illegal Operation24-Oct-05 20:28
Illegal Operation24-Oct-05 20:28 
AnswerRe: SQL Writable Data Pin
Gavin Jeffrey24-Oct-05 20:54
Gavin Jeffrey24-Oct-05 20:54 
QuestionCookies Pin
Smallishfry24-Oct-05 20:26
Smallishfry24-Oct-05 20:26 
AnswerRe: Cookies Pin
Christian Graus24-Oct-05 20:32
protectorChristian Graus24-Oct-05 20:32 
GeneralRe: Cookies Pin
S Douglas24-Oct-05 21:19
professionalS Douglas24-Oct-05 21:19 
AnswerRe: Cookies Pin
Dinuj Nath24-Oct-05 20:51
Dinuj Nath24-Oct-05 20:51 
QuestionRe: Cookies Pin
Smallishfry24-Oct-05 20:56
Smallishfry24-Oct-05 20:56 
AnswerRe: Cookies Pin
code-frog24-Oct-05 21:06
professionalcode-frog24-Oct-05 21:06 
AnswerJust a marketing tip... Pin
Daniel Turini24-Oct-05 21:36
Daniel Turini24-Oct-05 21:36 

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.