Articles → LIGHT SWITCH 2011 → Enable multi selection in grid in lightswitch 2011

Enable multi selection in grid in lightswitch 2011














Software requirement











Prerequisite knowledge













Steps of execution





















Click to Enlarge




Click to Enlarge




Click to Enlarge




Click to Enlarge



partial void EditableEmployeesGrid_Created()
{
  // Write your code here.
  this.FindControl("grid").ControlAvailable += new EventHandler<ControlAvailableEventArgs>(EditableEmployeesGrid_ControlAvailable);   
}




Partial void EditableEmployeesGrid_Created()
{
            // Write your code here.
            this.FindControl("grid").ControlAvailable += new EventHandler<ControlAvailableEventArgs>(EditableEmployeesGrid_ControlAvailable);   
}

void EditableEmployeesGrid_ControlAvailable(object sender, ControlAvailableEventArgs e)
{
   if (e.Control is DataGrid)
   {
         DataGrid grid = (DataGrid)e.Control;
         grid.SelectionMode = DataGridSelectionMode.Extended;
   }
}





Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, November 21, 2012

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250