コード例 #1
0
		void GridEditingControlSelectedIndexChanged(object sender, EventArgs e)
		{
			if (gridEditingControl.SelectedItem == EditTag.Instance) {
				DataGridViewComboBoxCell cell = grid.CurrentCell as DataGridViewComboBoxCell;
				if (cell == null) return;
				Solution.ProjectConfigurationPlatformMatching matching = cell.Tag as Solution.ProjectConfigurationPlatformMatching;
				if (matching != null) {
					inUpdate = true;
					using (Form dlg = new EditAvailableConfigurationsDialog(matching.Project,
					                                                        cell.ColumnIndex != configurationColumn.Index))
					{
						dlg.ShowDialog(this);
					}
					
					grid.EndEdit();
					
					inUpdate = true;
					
					// end edit to allow updating the grid
					grid.EndEdit();
					
					// we need to change the current cell because otherwise UpdateGrid cannot change the
					// list of combobox items in this cell
					grid.CurrentCell = grid.Rows[cell.RowIndex].Cells[0];
					
					// remove cell.Value because otherwise the grid view crashes in UpdateGrid
					cell.Value = null;
					
					UpdateAvailableSolutionConfigurationPlatforms();
					UpdateGrid();
				}
			}
		}
コード例 #2
0
		void PlatformComboBoxSelectedIndexChanged(object sender, EventArgs e)
		{
			if (!inUpdate) {
				inUpdate = true;
				if (platformComboBox.SelectedIndex == platformComboBoxEditIndex) {
					using (Form dlg = new EditAvailableConfigurationsDialog(solution, true)) {
						dlg.ShowDialog(this);
					}
					UpdateAvailableSolutionConfigurationPlatforms();
				}
				UpdateGrid();
			}
		}