Hi,
I am trying to implement the CheckboxSelectionEventHandler. However, it is not firing after a postback. I am setting the handler on the server side.
this.wdtFleet.AutoPostBackFlags.CheckBoxSelectionChanged = Infragistics.Web.UI.AutoPostBackFlag.On;
this.wdtFleet.CheckBoxSelectionChanged += new DataTreeCheckBoxSelectionEventHandler(wdtFleet_CheckBoxSelectionChanged);
It fires for the first time, however after a postback, it stops working.
Another thing, is there any way to hide the check box of the parent node on server side?
Hi Astrata,
there is no built-in functionality on server side. You can consider this as a feature request: https://es.infragistics.com/Login.aspx?returnURL=%2fDevCenterLogin.aspx%3freturnURL%3d%2fProtected%2fRequestFeature.aspx
But you can hide root checkbox on client side with jQuery:
function WebDataTree1_CheckBoxSelectionChanged(sender, eventArgs) {
var domElement = sender.getNode(0)._element;
$(domElement).children().filter(function (index) {
if (index == 1) {
$(this).css('display', 'none');
}
});
The real issue on the first post is that I have two event handler, one is for the Checkboxselection and another is for the node click. When i check on the check box, it is triggering the node click function/event plus the CheckboxSelectionChange event. When i click on the node, it is also triggering the CheckboxSelectionChang. We are not sure why this is happening.
Hope you can help. Thanks.
Please disregard the first issue that I mentioned above. I was able to figure it out.
Please just answer my question above.