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.

F2 sets cell in editmode despite Readonly=true

Thread ID:

Created:

Updated:

Platform:

Replies:

47761 Aug 11,2006 04:33 AM Aug 16,2006 06:26 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 11, 2006 04:33 AM

I''ve set the readonly property on the tablestyle.
and set ActivateCurrentCellBehavior = GridCellActivateAction.None.

However, when I press F2, the current cell goes into editmode (shows caret). It does not allow actually changing the cell contents though.

Is there any way to prevent the caret from showing in this case?

Thanks

Administrator [Syncfusion]
Replied On August 11, 2006 06:39 AM

Hi Palmer,

In the CurrentCellKeyDown event handler, check for e.KeyCode to be F2 and handle the event by setting e.Handled to true. This will help you.

// CurrentCellKeyDown_Event
if( e.KeyCode == Keys.F2 )
{
e.Handled = true;
}

Regards,
Rajagopal

Administrator [Syncfusion]
Replied On August 11, 2006 08:00 AM

That works.

Can you log this as a bug in the "TextBox" cell type?
There''s no reason for the cell to go in editmode in this situation.

Administrator [Syncfusion]
Replied On August 14, 2006 04:30 AM

Hi Palmer,

This is the default behavior. When you press F2, BeginEdit() method is called, which causes the caret to go inside the cell. Instead of setting the ReadOny property to true, set the celltype to Static for all the grid cells.

this.gridControl1.TableStyle.CellType = "Static";

Thanks,
Rajagopal

Administrator [Syncfusion]
Replied On August 16, 2006 04:27 AM

Hi Rajagopal,

Surely the default behaviour doesn''t make sense in this case?

If the cell is readonly its contents can''t be changed so why set the caret in that case, it only confuses the end user.

If you don''t want to call it a bug, can you then log it as a feature request?

Administrator [Syncfusion]
Replied On August 16, 2006 06:26 AM

Hi Palmer,

I have contacted the development team regarding this issue and will be updating you soon. Sorry for the inconvenience caused.

Thanks for your patience.
Best Regards,
Haneef

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.

;