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.

Changing Multiple Cell Values in Code on a GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

108876 May 16,2013 04:34 PM May 20,2013 01:33 AM Windows Forms 1
loading
Tags: GridControl
Frank Carr
Asked On May 16, 2013 04:34 PM

In my WinForms app I'm displaying the results of a search in a GDBG. The specs call for giving users the ability to update a column (integer value) in the results individually or in bulk. Where I'm encountering a problem is how to handle the bulk update. I loop through the grid like so...
 
Dim RowCnt As Integer = gridMain.Model.RowCount
For Cntr = 1 To RowCnt
   
gridMain(Cntr, 6).CellValue = CInt(textQuantity.Text)
Next
 
But, the row goes into edit mode and only the first row is updated. The edit icon is showing on the row. How do I tell the grid to ignore row editing functionality when the bulk update is occurring?

Ragamathulla B [Syncfusion]
Replied On May 20, 2013 01:33 AM

Hi Frank,

 

Thank you for your interest in sync fusion products,

 

You can update the bulk data’s in to the grid. Please refer to the following code. Which illustrates the same.

 

 

                   grid.Binder.DirectSaveCellInfo = true;

                    try

                    {

                        foreach (GridRangeInfo range in ranges)

                        {

                            for (int i = range.Top; i <= range.Bottom; i++)

                            {

                                double currentValue = Convert.ToDouble(grid[i, range.Left].CellValue);

                                currentValue += value;

                                grid[i, range.Left].CellValue = Convert.ChangeType(currentValue, grid[i, range.Left].CellValueType);

                            }

                        }

                    }

                    finally

                    {

                        grid.Binder.DirectSaveCellInfo = false;

                    }

 

 

Hope this will be helpful for your reference.

 

http://help.syncfusion.com/ug/windows%20forms/grid/Documents/currentcellevents.htm

 

Let me know if you have any further concerns.

 

Regards,

Ragamathullah B.


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.

;