public virtual void OnChanged(RangeRegionChangedEventArgs e) { if (Changed != null) { Changed(this, e); } }
private void _grid_Selection_SelectionChanged(object sender, SourceGrid.RangeRegionChangedEventArgs e) { try { if (!_updating) { if (e.RemovedRange != null && _selectedEntity != null && _selectedOn.TimeElapsed().TotalMilliseconds > 50) { RaiseEntityDeselectedEvent(_selectedEntity); _selectedEntity = null; } if (e.AddedRange != null) { var addedRows = e.AddedRange.GetRowsIndex(); if (addedRows.Length > 0 && _selectedOn.TimeElapsed().TotalMilliseconds > 50) { _selectedEntity = _rowToEntityMap[addedRows[0]]; _selectedOn = DateTime.Now; RaiseEntitySelectedEvent(_selectedEntity); } } } } catch (Exception error) { ExceptionDialog.Show(this, error); } }
void Selection_SelectionChanged(object sender, SourceGrid.RangeRegionChangedEventArgs e) { object[] rows = dataGrid.SelectedDataRows; if (rows != null && rows.Length > 0) { DataRowView row = (DataRowView)rows[0]; lblSelectedRow.Text = row["Country"].ToString(); } }
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; } } }
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; } }
/// <summary> /// New account is selected in grdAccounts /// </summary> private void grdAccounts_RowSelected(object sender, RangeRegionChangedEventArgs e) { DataRowView rowView = (DataRowView)grdAccounts.Rows.IndexToDataSourceRow(grdAccounts.Selection.ActivePosition.Row); if (rowView != null) { FPreviouslySelectedAccountsRow = rowView.Row; if (rbtFromAmountOption.Checked) { // update percentage FromAmountChanged(sender, null); } else { //update amount FromPercentageChanged(sender, null); } } }
private void dataGrid_onSelectionChanged(object sender, RangeRegionChangedEventArgs e) { if (dataGrid.SelectedDataRows.Length > 0) { QuoteServiceInformation cQuoteInfo = dataGrid.SelectedDataRows[0] as QuoteServiceInformation; txtDescription.Text = cQuoteInfo.Description; btnEnabled.Visible = !cQuoteInfo.Enabled; btnDisabled.Visible = cQuoteInfo.Enabled; btnReLogin.Enabled = cQuoteInfo.Enabled; btnRefreshSymbol.Enabled = cQuoteInfo.Enabled; } }
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; }
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; } } }