Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • JScript to Check or Uncheck Checkbox in a Grid

    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 167
    Comment on it

    JScript to Check or Uncheck Checkbox in a Grid

    Inputs:


    GridObject: Object of the grid in which checkbox exists
    Column: Column name where value is searched
    CellValue: Reference cell value
    Status: Check or uncheck the checkbox

    function CheckUncheckCheckbox(GridObject, Column, CellValue, Status)
    {
        // Column Index
        var ColumnIndex = GetColumnIndex(GridObject,Column);
        // Row index
        var RowIndex = GetRowIndex(GridObject, Column, CellValue);
        // Row node
        var RowNode = Grid.m_Nodes.get(RowIndex);
        // Current Checkbox state
        var currentStatus = RowNode.getChecked();
        if(currentStatus == status)
        {
        Log.Message("Checkbox is already "+(Status?"checked":"unchecked"));
        }
        else
        {
        GridObject.doCheck(RowNode);
        Log.Message("Successfully "+(Status?"checked":"unchecked"));
        }
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: