We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

how to change the value of a cell?

Thread ID:

Created:

Updated:

Platform:

Replies:

132448 Sep 2,2017 06:24 PM Sep 4,2017 07:53 AM Xamarin.Android 2
loading
Tags: SfDataGrid
Abraham Esrit Ines Rivera Villegas
Asked On September 2, 2017 06:24 PM

I am doing an application that consists in a DataGrid filled only with numbers, every time that you touch a cell the value of the cell will increase one at once, when I touch the cell the application crash.

I was doing the same in Xamarin.Forms, but the application not crashed.

This is the event Tapped

private void GrdCountConcept_GridTapped(object sender, GridTappedEventArgs e)
        {
            grdCountConcept.EndEdit();

            int rowIndex = e.RowColumnIndex.RowIndex;
            int columnIndex = e.RowColumnIndex.ColumnIndex;

            List<OrderInfo> source = (grdCountConcept.ItemsSource as List<OrderInfo>).ToList();

            if (columnIndex == 0)
            {
                grdCountConcept.ItemsSource = source;
            }
            else
            {
                var recordData = grdCountConcept.GetRecordAtRowIndex(rowIndex);
                string columnName = grdCountConcept.Columns[columnIndex].MappingName;

                int cellValue = Convert.ToInt16(grdCountConcept.GetCellValue(recordData, columnName));

                cellValue++;

                switch (columnIndex)
                {
                    case 1:
                        source[rowIndex - 1].Talla4 = cellValue;
                        break;
                    case 2:
                        source[rowIndex - 1].Talla6 = cellValue;
                        break;
                    case 3:
                        source[rowIndex - 1].Talla8 = cellValue;
                        break;
                    case 4:
                        source[rowIndex - 1].Talla10 = cellValue;
                    default:
                        break;
                }

                grdCountConcept.ItemsSource = source;
            }
        }

Where OrderInfo only has int values

Abraham Esrit Ines Rivera Villegas
Replied On September 2, 2017 11:04 PM

You guys are a terrible suckers, I already resolved it


Ashok N [Syncfusion]
Replied On September 4, 2017 07:53 AM

Hi Abraham, 
 
Thank you for your interest in Syncfusion.  To provide some perspective, our standard turnaround time for incidents and forums is 24 hours (business days). It is our expectation that support incidents or forum posts created will be both respectful and professional in nature, and free of profanity.   
 
Regards, 
Ashok 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;