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.

Seeming problem in SaveCellInfo

Thread ID:

Created:

Updated:

Platform:

Replies:

17429 Aug 9,2004 08:36 AM Aug 9,2004 08:57 AM Windows Forms 1
loading
Tags: GridControl
Daniel Chait
Asked On August 9, 2004 08:36 AM

It seems that in the SaveCellInfo event, in the case where I am pasting cells that I copied from elsewhere in the grid, the GridSaveCellInfoEventArgs are actually describing the copied cells, not the cells I am setting. For example, hook the code below to a grid (virtual grid using QueryCellInfo) which is working fine, and has some read-only cells and some read-write cells. In such case, copy some read-write cells and paste over read-only cells, it allows it. However copy some read-only cells, paste them over some read-write cells, it prevents it. Why?? private void grid_SaveCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventArgs e) { System.Diagnostics.Debug.WriteLine(String.Format("SaveCellInfo({0},{1}) Readonly={2}", e.RowIndex, e.ColIndex, e.Style.ReadOnly)); if ( !e.Style.ReadOnly ) { PropertyDescriptor p = _settings.Columns[e.ColIndex-1].PropertyDescriptor; DataboundRow row = _rows[e.RowIndex-1]; p.SetValue(row, e.Style.Text); } e.Handled = true; }

Administrator [Syncfusion]
Replied On August 9, 2004 08:57 AM

Unless I am missing something, I think your code is working as expected. >>In such case, copy some read-write cells and paste over read-only cells, it allows it. In such a case, e.Style.ReadOnly would be false, correct? So, your code sets the value. >>However copy some read-only cells, paste them over some read-write cells, it prevents it. Why?? In this case, e.StyleReadOnly = true, correct? So, you code does not set the value.

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.

;