Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Checkbox in UltraWebBand
posted

I have an UltraWebGrid that consists of two UltraWebBands.  One UltraWebBand is the parent and the other is the child. The child band has a column that is defined as a checkbox.  When the user selects a checkbox from the child band, I want the child band for the row to collapse and then write a value from one of the columns in the child band to a value in one of the columns in the parent band.  Can I do this on the server side or should it be done via javascript?  Can you supply an example of how to do this for each method (server side and client side). 

My application is in visual studio and I am using visual basic.  Thanks.

Parents
No Data
Reply
  • 37874
    posted

    Hi tennisne1,

    This can be achieved client-side, for example in the AfterCellUpdateHandler event:

    function UltraWebGrid1_AfterCellUpdateHandler(gridName, cellId){
        if (igtbl_getCellById(cellId).Column.Key == "ChildCheck") {
            var currentRow = igtbl_getCellById(cellId).Row;
            var parentRow = currentRow.ParentRow;
            var newValue = currentRow.getCell(2).getValue();
            if (parentRow != null) {
                parentRow.setExpanded(false);
                parentRow.getCell(1).setValue(newValue);
            }
        }
    }

    Please let me know if this helps.

Children