private void grDanhSach_SelectedCellsChanged(object sender, GridViewSelectedCellsChangedEventArgs e)
 {
     if (grDanhSach.CurrentCell != null)
     {
         grDanhSach.CurrentCell.BeginEdit();
     }
 }
Beispiel #2
0
        private void OnSelectedCellsChanged(GridViewSelectedCellsChangedEventArgs obj)
        {
            if (obj.AddedCells.Count == 0)
            {
                return;
            }

            Telerik.Windows.Controls.GridViewCellInfo cell = obj.AddedCells[0];
            SelectedItem = cell.Item as CashFlowDetail;
        }
Beispiel #3
0
 private void RadGridViewSelectedCellsChanged(object sender, GridViewSelectedCellsChangedEventArgs e)
 {
     if (_thread != null)
     {
         _thread.Abort();
         PhotoModel.SaveChanges();
     }
     _thread = new Thread(ThreadInvoke);
     _thread.Start(((DataControl)sender).SelectedItem);
     RadGridView.ScrollIntoView(RadGridView.SelectedItem);
 }
        /// <summary>
        /// identifying the cell clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgRelativePerformance_SelectedCellsChanged(object sender, GridViewSelectedCellsChangedEventArgs e)
        {
            //ignore involuntary selection event
            if (e.AddedCells.Count == 0)
            {
                return;
            }

            int selectedColumnIndex = e.AddedCells[0].Column.DisplayIndex;

            //when cells on Column ID column, toggled grid is displayed
            if (selectedColumnIndex == 0)
            {
                return;
            }

            //ignore null cells
            if (selectedColumnIndex != this.dgRelativePerformance.Columns.Count - 1)
            {
                if (((e.AddedCells[0].Item as RelativePerformanceData).RelativePerformanceCountrySpecificInfo[selectedColumnIndex - 1]
                     as RelativePerformanceCountrySpecificData).Alpha == null)
                {
                    return;
                }
            }

            //catching cells clicked in sector columns
            string countryID = (e.AddedCells[0].Item as RelativePerformanceData).CountryId;
            string sectorID  = null;

            if (selectedColumnIndex != this.dgRelativePerformance.Columns.Count - 1)
            {
                sectorID = ((e.AddedCells[0].Item as RelativePerformanceData).RelativePerformanceCountrySpecificInfo[e.AddedCells[0].Column.DisplayIndex - 1]
                            as RelativePerformanceCountrySpecificData).SectorId;
            }

            eventAggregator.GetEvent <RelativePerformanceGridClickEvent>().Publish(new RelativePerformanceGridCellData()
            {
                CountryID = countryID,
                SectorID  = sectorID,
            });
        }
Beispiel #5
0
 private void Dgg2_SelectedCellsChanged(object sender, GridViewSelectedCellsChangedEventArgs e)
 {
 }