Hi There,
I have a RadTreeView (Q2 2008) inside of an UpdatePanel. Also inside the UpdatePanel is a button that deletes all the "checked" nodes.
I'm using jQuery to extend the functionality so that all the child nodes get checked and unchecked with the parent node. If one of the child nodes is unchecked, the parent checkbox is unchecked too (but not the prev and next child checkboxes). I was able to achieve this using the following code:
This code is working out great and when I uncheck one of the child nodes, the parent appears to be uncheck... however, when I click the button to delete all checked nodes, the parent still gets deleted. I'm thinking that somewhere along the way, the jQuery "uncheck" isn't registering with my asyncronos postback?
I have a RadScriptManager on the page and I've tried registering the script using Page.RegisterStartupScript... but it still doesn't work.
Any suggestions?
I have a RadTreeView (Q2 2008) inside of an UpdatePanel. Also inside the UpdatePanel is a button that deletes all the "checked" nodes.
I'm using jQuery to extend the functionality so that all the child nodes get checked and unchecked with the parent node. If one of the child nodes is unchecked, the parent checkbox is unchecked too (but not the prev and next child checkboxes). I was able to achieve this using the following code:
function pageLoad() { |
$('.rtChk').bind('click', function() { |
// Check/uncheck child checkboxes |
var parentLi = $(this).parents('.rtLI:first'); |
if ($(this).is(':checked')) |
$(parentLi).find('.rtChk:not(:first)').attr('checked', true); |
else |
$(parentLi).find('.rtChk:not(:first)').attr('checked', false); |
// Uncheck parent checkbox on uncheck |
var grandParentLi = $(this).parents('.rtLI:first').parents('.rtLI:first'); |
if ($(this).is(':checked') == false) |
$(grandParentLi).find('.rtChk:first').attr('checked', false); |
}); |
} |
This code is working out great and when I uncheck one of the child nodes, the parent appears to be uncheck... however, when I click the button to delete all checked nodes, the parent still gets deleted. I'm thinking that somewhere along the way, the jQuery "uncheck" isn't registering with my asyncronos postback?
I have a RadScriptManager on the page and I've tried registering the script using Page.RegisterStartupScript... but it still doesn't work.
Any suggestions?