private void dataGrid_onSelectionChanged(object sender, RangeRegionChangedEventArgs e) { if (dataGrid.SelectedDataRows.Length > 0) { OrderServiceInformation cOrderInfo = dataGrid.SelectedDataRows[0] as OrderServiceInformation; comboOrderService.Items.Clear(); string[] sServices = cOrderInfo.Services; int iLength = sServices.Length; if (iLength == 0) { btnOK.Enabled = false; } else { for (int i = 0; i < iLength; i++) { comboOrderService.Items.Add(sServices[i]); } comboOrderService.SelectedIndex = 0; btnOK.Enabled = true; } } }
protected virtual void OnSelectionChanged(RangeRegionChangedEventArgs e) { if (SelectionChanged != null) { SelectionChanged(this, e); } //Invalidate the new selection and the previous (removed) selection if (e.AddedRange != null) { foreach (Range r in e.AddedRange) { Grid.InvalidateRange(r); } } if (e.RemovedRange != null) { foreach (Range r in e.RemovedRange) { Grid.InvalidateRange(r); } } }
protected virtual void OnSelectionChanged(RangeRegionChangedEventArgs e) { if (SelectionChanged != null) { SelectionChanged(this, e); } InvalidateGridSelection(e); }
private void Selection_SelectionChanged(object sender, RangeRegionChangedEventArgs e) { int x = (sender as IGridSelection).ActivePosition.Row; if (x > -1) { LogLine line = (LogLine)this.grid1[x, 0].Tag; this.viewer.ViewMessage(line.FixMessage); } }
private void dataGrid_onSelectionChanged(object sender, RangeRegionChangedEventArgs e) { if (dataGrid.SelectedDataRows.Length > 0) { _QuoteServiceInfo cQuoteInfo = dataGrid.SelectedDataRows[0] as _QuoteServiceInfo; txtDescription.Text = cQuoteInfo.Description; btnEnabled.Visible = !cQuoteInfo.Enabled; btnDisabled.Visible = cQuoteInfo.Enabled; btnReLogin.Enabled = cQuoteInfo.Enabled; btnRefreshSymbol.Enabled = cQuoteInfo.Enabled; } }
private void OnMaterialChanged(object sender, RangeRegionChangedEventArgs e) { // compute max layer count from static BCT QualityData qdata = SelectedMaterial; if (null == qdata) { return; } Vector3D caseDim = CaseDimensions; double staticBCT = qdata.ComputeStaticBCT(caseDim, Resources.CASETYPE_AMERICANCASE, McKeeFormulaType); FillGridDynamicBCT(); }
private void gridSession_onSelectionChanged(object sender, RangeRegionChangedEventArgs e) { if (gridSession.SelectedDataRows.Length > 0) { SessionObject cSession = gridSession.SelectedDataRows[0] as SessionObject; DaylightTime cDaylightTime = cSession.Daylight; bool bEnabled = cDaylightTime != null; checkDaylight.Checked = bEnabled; if (bEnabled) { pickerDaylightStart.Value = cDaylightTime.StartDate; pickerDaylightEnd.Value = cDaylightTime.EndDate; } } }
private void AnalysisAttributesGrid_RowSelected(System.Object sender, RangeRegionChangedEventArgs e) { if (grdAnalAttributes.Selection.ActivePosition.IsEmpty() || (grdAnalAttributes.Selection.ActivePosition.Column == 0)) { return; } if ((GetSelectedAttributeRow() == null) || (FPSAttributesRow == GetSelectedAttributeRow())) { return; } FPSAttributesRow = GetSelectedAttributeRow(); FMainDS.AFreeformAnalysis.DefaultView.RowFilter = String.Format("{0}='{1}' AND {2}=true", AFreeformAnalysisTable.GetAnalysisTypeCodeDBName(), FPSAttributesRow.AnalysisTypeCode, AFreeformAnalysisTable.GetActiveDBName()); //Refresh the combo values int analTypeCodeValuesCount = FMainDS.AFreeformAnalysis.DefaultView.Count; if (analTypeCodeValuesCount == 0) { MessageBox.Show(Catalog.GetString( "No attribute values are defined!"), FPSAttributesRow.AnalysisTypeCode, MessageBoxButtons.OK, MessageBoxIcon.Error); } string[] analTypeValues = new string[analTypeCodeValuesCount]; FMainDS.AFreeformAnalysis.DefaultView.Sort = AFreeformAnalysisTable.GetAnalysisValueDBName(); int counter = 0; foreach (DataRowView dvr in FMainDS.AFreeformAnalysis.DefaultView) { AFreeformAnalysisRow faRow = (AFreeformAnalysisRow)dvr.Row; analTypeValues[counter++] = faRow.AnalysisValue; } cmbAnalAttribValues.StandardValuesExclusive = true; cmbAnalAttribValues.StandardValues = analTypeValues; }
/// <summary> /// AlanP: Sep 2013 /// This invalidates all the added or removed ranges specified. The code used to be inside OnSelectionChanged above. /// By calling this in place of OnSelectionChanged we do not call the SelectionChanged event in user code. /// </summary> public void InvalidateGridSelection(RangeRegionChangedEventArgs e) { //Invalidate the new selection and the previous (removed) selection if (e.AddedRange != null) { foreach (Range r in e.AddedRange) { Grid.InvalidateRange(r); } } if (e.RemovedRange != null) { foreach (Range r in e.RemovedRange) { Grid.InvalidateRange(r); } } }
private void SelectionOnSelectionChanged(object sender, RangeRegionChangedEventArgs rangeRegionChangedEventArgs) { // multiselection is off, so we can cheat... int[] rowsIndex = Grid1.Selection.GetSelectionRegion().GetRowsIndex(); if (rowsIndex.Length == 0) { bnDelete.Enabled = false; bnUp.Enabled = false; bnDown.Enabled = false; return; } int selectedRow = rowsIndex[0]; bnDelete.Enabled = true; bnUp.Enabled = (selectedRow > 1); bnDown.Enabled = (selectedRow < Grid1.RowsCount - 1); }
void Selection_SelectionChanged(object sender, RangeRegionChangedEventArgs e) { updateToolbar(); }
private void SelectionChanged(object sender, RangeRegionChangedEventArgs e) { SelectionOnSelectionChanged(); StartTimer(); }
protected virtual void OnSelectionChanged(RangeRegionChangedEventArgs e) { if (SelectionChanged != null) SelectionChanged(this, e); InvalidateGridSelection(e); }
/// <summary> /// AlanP: Sep 2013 /// This invalidates all the added or removed ranges specified. The code used to be inside OnSelectionChanged above. /// By calling this in place of OnSelectionChanged we do not call the SelectionChanged event in user code. /// </summary> public void InvalidateGridSelection(RangeRegionChangedEventArgs e) { //Invalidate the new selection and the previous (removed) selection if (e.AddedRange != null) { foreach (Range r in e.AddedRange) Grid.InvalidateRange(r); } if (e.RemovedRange != null) { foreach (Range r in e.RemovedRange) Grid.InvalidateRange(r); } }
private void OnMaterialChanged(object sender, RangeRegionChangedEventArgs e) { FillGridDynamicBCT(); }
protected virtual void OnSelectionChanged(RangeRegionChangedEventArgs e) { if (SelectionChanged != null) SelectionChanged(this, e); //Invalidate the new selection and the previous (removed) selection if (e.AddedRange != null) { foreach (Range r in e.AddedRange) Grid.InvalidateRange(r); } if (e.RemovedRange != null) { foreach (Range r in e.RemovedRange) Grid.InvalidateRange(r); } }
void Selection_SelectionChanged(object sender, RangeRegionChangedEventArgs e) { }
private void Selection_SelectionChanged(object sender, RangeRegionChangedEventArgs e) { int gridRow = grdDetails.Selection.ActivePosition.Row; ShowGridRow(gridRow); }
private void AnalysisAttributesGrid_RowSelected(System.Object sender, RangeRegionChangedEventArgs e) { TSgrdDataGridPaged Grid = sender as TSgrdDataGridPaged; if (Grid == null) { Grid = (TSgrdDataGridPaged)((SourceGrid.Selection.RowSelection)sender).Grid; } if (Grid.Selection.ActivePosition.IsEmpty() || (Grid.Selection.ActivePosition.Column == 0)) { return; } if ((TAnalysisAttributes.GetSelectedAttributeRow(Grid) == null) || (FPSAttributesRow == TAnalysisAttributes.GetSelectedAttributeRow(Grid))) { return; } FPSAttributesRow = TAnalysisAttributes.GetSelectedAttributeRow(Grid); string currentAnalTypeCode = FPSAttributesRow.AnalysisTypeCode; FCacheDS.AFreeformAnalysis.DefaultView.RowFilter = String.Format("{0}='{1}' AND {2}=true", AFreeformAnalysisTable.GetAnalysisTypeCodeDBName(), currentAnalTypeCode, AFreeformAnalysisTable.GetActiveDBName()); int analTypeCodeValuesCount = FCacheDS.AFreeformAnalysis.DefaultView.Count; if (analTypeCodeValuesCount == 0) { MessageBox.Show(Catalog.GetString( "No attribute values are defined!"), currentAnalTypeCode, MessageBoxButtons.OK, MessageBoxIcon.Error); } string[] analTypeValues = new string[analTypeCodeValuesCount]; FCacheDS.AFreeformAnalysis.DefaultView.Sort = AFreeformAnalysisTable.GetAnalysisValueDBName(); int counter = 0; foreach (DataRowView dvr in FCacheDS.AFreeformAnalysis.DefaultView) { AFreeformAnalysisRow faRow = (AFreeformAnalysisRow)dvr.Row; analTypeValues[counter] = faRow.AnalysisValue; counter++; } //Refresh the combo values if (Grid.Name == grdFromAnalAttributes.Name) { FcmbFromAnalAttribValues.StandardValuesExclusive = true; FcmbFromAnalAttribValues.StandardValues = analTypeValues; } else { FcmbToAnalAttribValues.StandardValuesExclusive = true; FcmbToAnalAttribValues.StandardValues = analTypeValues; } }