Need help updating values on the grid, based on cell's security.

Hi! Im currently working on a DataGrid. Bases on our app's security. In this particular case, the user can update the row "Jun 2005" only. Al the other rows can't be updated. The column "Valor Real" and "Valor Meta" are the only columns that the user can work with. 

This is my view Model;

public class IndicadoresDetalleViewModel : INotifyPropertyChanged

    {

        private double valorReal { get; set; }

        private double valorMeta { get; set; }

        public int IdModelo { get; set; }

public int IdPeriodo { get; set; }

public string Periodo { get; set; }

public int IdIndicador { get; set; }

public decimal Porcentaje { get; set; }

        public string Semaforo { get; set; }

public int Color { get; set; }

public string ColorHexa { get; set; }

public double PVA_PESO { get; set; }

public int ContCamposAdic { get; set; }

        public Xamarin.Forms.Color ColorXam { get; set; }

        public string IconSource { get; set; }

        public string IconoCampos { get; set; }

public bool bold { get; set; }

        public bool PeridoActual { get; set; }


        public double ValorReal

        {

            get

            {

                return valorReal;

            }

            set

            {

                this.valorReal = value;

                RaisePropertyChanged("ValorReal");

            }

        }


        public double ValorMeta

        {

            get

            {

                return valorMeta;

            }

            set

            {

                this.valorMeta = value;

                RaisePropertyChanged("ValorMeta");

            }

        }


        public bool Bold

        {

            get { return bold; }

            set

            {

                if (bold != value)

                {

                    bold = value;

                    OnPropertyChanged("Bold");

                }

            }

        }


        #region INotifyPropertyChanged


        public event PropertyChangedEventHandler PropertyChanged;


        private void OnPropertyChanged(string name)

        {

            if (PropertyChanged != null)

                PropertyChanged(this, new PropertyChangedEventArgs(name));

        }


        private void RaisePropertyChanged(String Name)

        {

            if (PropertyChanged != null)

                this.PropertyChanged(this, new PropertyChangedEventArgs(Name));

        }

}

I need to create a list of modified values for each cell, based on the modified row and column, to update the values on our server. However, I'm unable to get the values.

Can someone please take a look and give me a hand?

Thanks in advance.



Attachment: Captura_97a31b10.zip

3 Replies

AA Andres Alvarado August 26, 2022 03:01 PM UTC

Here's a screenshot of the grid.




SV Suja Venkatesan Syncfusion Team August 29, 2022 06:06 PM UTC

Hi Andrea,

Currently,  we are checking the possibility to achieve your requirements in the sample level. we will update you with further details on or before September 1, 2022. We appreciate your patience and understanding.

Regards,
Suja


SV Suja Venkatesan Syncfusion Team September 1, 2022 05:01 PM UTC

Hi Andrea,

We would like to let you know that if you update the row value through editing then the CurrentCellEndEdit event gets triggered after the editing, in that we can get the RowColumnIndex and updated new value from GridCurrentCellEndEditEventArgs. Please refer to our user guidelines documentation regarding the CurrentCellEndEdit event. 
 

If we misunderstood your requirement, Please revert to us with detail on how will you update the value in your application with code snippets. It will be more for us to provide timely solutions.

Regards,
Suja

Loader.
Up arrow icon