Multiple Checkbox selection

Posted by: sally on 19 June 2018, 2:31 pm EST

    • Post Options:
    • Link

    Posted 19 June 2018, 2:31 pm EST

    We have a form with a column of checkboxes representing dates. Currently a user can check as many boxes as they like, but they need to check one at a time. Does Spread allow for multiple checkbox selections at one time either by using a key combination or mouse? I’ve looked around and tried various things but no success so far.

    Thanks,

    Sally S

  • Posted 20 June 2018, 2:36 am EST

    Hi Sally,

    You can create a cell as CheckboxCelltype and handle the button click event to set the value for other checkboxes.

    For example:

    
     for(int i=0;i<this.fpSpread1_Sheet1.RowCount;++i)
    
                {
    
                    fpSpread1.Sheets[0].Cells[i,0].CellType = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
    
                    fpSpread1.Sheets[0].Cells[i,0].Value = false;
    
                    fpSpread1.Sheets[0].Cells[i,0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
    
                }
    
    private void fpSpread_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
    
            {
    
                for(int i=0;i<this.fpSpread1_Sheet1.RowCount;++i)
    
                {
    
                    fpSpread1.Sheets[0].Cells[i,0].Value = false;
    
                }
    
                ((FarPoint.Win.Spread.FpSpread)sender).Sheets[0].Cells[e.Row, e.Column].Value = true;
    
            }
    
    

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels