/// <summary>
        /// Occurs when end edit the current cell in SfDataGrid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void DataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)
        {
            var visibleColumnIndex = (this.dataGrid.DetailsViewDefinition[0] as GridViewDefinition).DataGrid.ResolveToGridVisibleColumnIndex(args.RowColumnIndex.ColumnIndex);
            var column             = (this.dataGrid.DetailsViewDefinition[0] as GridViewDefinition).DataGrid.Columns[visibleColumnIndex];

            if (column.MappingName.Equals("UnitPrice") || column.MappingName.Equals("Discount"))
            {
                (args.OriginalSender as DetailsViewDataGrid).UpdateDataRow(args.RowColumnIndex.RowIndex);
            }
        }
Exemplo n.º 2
0
        private void OnPatternValuesDataGridCurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
        {
            var dataGrid = (SfDataGrid)sender;
            var values   = dataGrid.DataSource as PatternValue[];

            if (values != null)
            {
                RefreshChart(values);
            }
        }
Exemplo n.º 3
0
 void grid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)
 {
     if (window == null)
     {
         return;
     }
     window.ZoomSlider.IsEnabled         = true;
     window.ZoomIncreaseButton.IsEnabled = true;
     window.ZoomDecreaseButton.IsEnabled = true;
     window.ZoomTextBlock.IsEnabled      = true;
     window.ModeTextBlock.Text           = "READY";
 }
        private void DataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
        {
            var sfDataGrid = sender as SfDataGrid;

            if (sfDataGrid.CurrentColumn.MappingName != "ShipCountry")
            {
                return;
            }
            var datarow = dataGrid.RowGenerator.Items.FirstOrDefault(dr => dr.RowIndex == e.RowColumnIndex.RowIndex);

            datarow.Element.DataContext = null;
            dataGrid.UpdateDataRow(e.RowColumnIndex.RowIndex);
        }
        protected override void Invoke(object parameter)
        {
            CurrentCellEndEditEventArgs args = parameter as CurrentCellEndEditEventArgs;
            var sfDataGrid = this.Target as SfDataGrid;

            if (sfDataGrid.CurrentColumn.MappingName != "ShipCountry")
            {
                return;
            }
            var datarow = sfDataGrid.RowGenerator.Items.FirstOrDefault(dr => dr.RowIndex == args.RowColumnIndex.RowIndex);

            datarow.Element.DataContext = null;
            sfDataGrid.UpdateDataRow(args.RowColumnIndex.RowIndex);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Method that handles teh end edit event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        void dataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)
        {
            if (!isCurrentCellValueChanged)
            {
                return;
            }

            var rowIndex    = args.RowColumnIndex.RowIndex;
            var columnIndex = args.RowColumnIndex.ColumnIndex;

            var range = dataGrid.CoveredCells.GetCoveredCellInfo(rowIndex, columnIndex);

            dataGrid.RemoveRange(range);
            isEditted = true;
            dataGrid.GetVisualContainer().InvalidateMeasure();
        }
Exemplo n.º 7
0
        private void dataGridCxC_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
        {
            try
            {
                DataRowView row      = (DataRowView)dataGridCxC.SelectedItems[0];
                decimal     cantidad = Convert.ToDecimal(row["cantidad_ped"]);



                decimal costo = Convert.ToDecimal(row["cost_uni_ped"]);
                row["subt_ped"] = cantidad * costo;

                if (cantidad.ToString() != "0.00" && cantidad.ToString() != "0")
                {
                    decimal cantidadSugerido = Convert.ToDecimal(row["sugerido"]);
                    row["subt_ped_sugerido"] = cantidadSugerido * costo;
                }
                else
                {
                    row["subt_ped_sugerido"] = "0.00";
                }
                if (cantidad.ToString() != "0.00" && cantidad.ToString() != "0")
                {
                    row["subt_kg"] = cantidad * Convert.ToDecimal(row["peso"]);
                }
                else
                {
                    row["subt_kg"] = "0.00";
                }



                sumarValores();
            }
            catch (Exception)
            {
                DataRowView row = (DataRowView)dataGridCxC.SelectedItems[0];
                row["cantidad_ped"]      = "0.00";
                row["subt_ped_sugerido"] = "0.00";
                row["subt_kg"]           = "0.00";
                row["subt_ped"]          = "0.00";
                sumarValores();
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Occurs when end edit the cell in SfDataGrid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        void OnSfDataGridCurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)
        {
            // Updates the totals with edited values.
            foreach (GridColumn column in this.SfDataGrid.Columns)
            {
                totalSales[column.MappingName] = GetSummaryValue(column.MappingName);
            }

            foreach (GridColumn column in this.SfDataGrid.Columns)
            {
                totalSelectedSales[column.MappingName] = GetSummaryValue(column.MappingName, false);
            }

            // Refresh unboundRow after complete editing.
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[0]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[1]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[2]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[3]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[4]);
            this.SfDataGrid.GetVisualContainer().InvalidateMeasureInfo();
        }
Exemplo n.º 9
0
        /// <summary>
        /// Occurs when current cell end edit called in SfDataGrid.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">Th <see cref="GridCurrentCellEndEditEventArgs"/> contains event data.</param>
        void sfDataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
        {
            // Updates the totals with edited values.
            foreach (GridColumn column in this.sfDataGrid.Columns)
            {
                totalSales[column.MappingName] = GetSummaryValue(column.MappingName);
            }

            foreach (GridColumn column in this.sfDataGrid.Columns)
            {
                totalSelectedSales[column.MappingName] = GetSummaryValue(column.MappingName, false);
            }

            // Refresh the Unbound rows.
            this.sfDataGrid.InValidateUnboundRow(this.sfDataGrid.UnboundRows[2]);
            this.sfDataGrid.InValidateUnboundRow(this.sfDataGrid.UnboundRows[3]);
            this.sfDataGrid.InValidateUnboundRow(this.sfDataGrid.UnboundRows[4]);

            // Refresh unboudnRow after complete editing.
            this.sfDataGrid.TableControl.Invalidate();
        }
Exemplo n.º 10
0
 private void _view_OnListDataGridCurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
 {
     HitungRingkasan();
 }
 //comentado
 private void dtGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
 {
     //dtGrid.View.Refresh();
 }
Exemplo n.º 12
0
 void cellgrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)
 {
     eventsTxtBox.Text += "\ncurrentcell end editing";
 }
 void dataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)
 {
     //Refreshing the DisCount unbound column at runtime
     this.dataGrid.UpdateUnboundColumn(this.dataGrid.CurrentItem, "Discount");
 }
Exemplo n.º 14
0
        void SfDataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args) {
            // Updates the totals with edited values.
            foreach (GridColumn column in this.SfDataGrid.Columns)
                totalSales[column.MappingName] = Convert.ToDecimal(GetSummaryValue(column.MappingName));

            foreach (GridColumn column in this.SfDataGrid.Columns)
                totalSelectedSales[column.MappingName] = Convert.ToDecimal(GetSummaryValue(column.MappingName, false));

            // Refresh unboundRow after complete editing.
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[0]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[1]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[2]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[3]);
            this.SfDataGrid.InValidateUnBoundRow(this.SfDataGrid.UnBoundRows[4]);
            this.SfDataGrid.GetVisualContainer().InvalidateMeasureInfo();
        }
Exemplo n.º 15
0
 private void _view_OnListDataGridCurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
 {
     HitungGrandTotal();
 }
Exemplo n.º 16
0
 private void SyncfusionGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
 {
 }
Exemplo n.º 17
0
 private void ListDataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
 {
     OnListDataGridCurrentCellEndEdit?.Invoke(sender, e);
 }
Exemplo n.º 18
0
 private void SfDataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
 {
     this.sfDataGrid.TableControl.Invalidate(this.sfDataGrid.TableControl.GetRowRectangle(e.DataRow.Index + 1, false));
 }
Exemplo n.º 19
0
 private void dataGrid_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs args)
 {
     //  this.AssociatedObject.SelectedIndex = _currentIndex + 1;
 }