Articles → LIGHT SWITCH 2011 → Convert checkbox nullable state to false in lightswitch 2011

Convert checkbox nullable state to false in

lightswitch 2011






Objective of this Tutorial





Prerequisites





















Steps Involved









Step 1.: Create any screen (without selecting

Screen Data option)









Click to Enlarge








Click to Enlarge
















Click to Enlarge


Step 2. Add Code to eliminate nullable value of checkbox



Click to Enlarge





using System.Collections.Generic;
using Microsoft.LightSwitch;
namespace LightSwitchApplication {
  public partial class EditableGrid {
    partial void ChkTest_Changed() {
      if (ChkTest == null) ChkTest = false;
    }

    partial void EditableGrid_InitializeDataWorkspace(List < IDataService > saveChangesTo) {
      if (ChkTest == null) ChkTest = false;
    }
  }
}







Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, May 19, 2014

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250