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.

Focus on read-only cell in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

28447 May 2,2005 03:07 PM May 24,2005 04:52 PM Windows Forms 7
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 2, 2005 03:07 PM

Hi, I have read-only columns in my grid. when the user click on read only column, grid allowm them to type one character. How to avoid this? If i use the following then user doesn’t see the focus on the cell private void gdbgMeritSummaryGrid_CurrentCellActivating_1(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellActivatingEventArgs e) { e.ColIndex = 0; } Thanks

Administrator [Syncfusion]
Replied On May 2, 2005 03:25 PM

What version of the grid you using? This is not a known problem in the recent releases provided you are setting the ReadOnly property of the GridBoundColumn.StyleInfo object for the columns. If you want to try to work around this problem in the version you are using, then you can subscribe to teh CurrentCellStartEditing event, and there set e.Cancel = true if grid.CurrentCell.ColIndex points to a column that you want to be readonly.

Administrator [Syncfusion]
Replied On May 2, 2005 04:27 PM

I am using the version # 3.0.1.1. I am using the following code to make column readonly // settting columns readonly foreach (GridBoundColumn column in gdbgMeritSummaryGrid.GridBoundColumns) { column.ReadOnly = true; } Please let me know if there is something that i need to do except using other solution suggested by you. thanks thanks

Administrator [Syncfusion]
Replied On May 2, 2005 06:03 PM

Where are you doing that code? I tried it in Form.Load, and did not see the problem you described. Here is the sample I tried. http://www.syncfusion.com/Support/user/uploads/GBDG_Readonly_239fb828.zip Do you see the problem in this sample? Can you upload a sample showing the problem?

Administrator [Syncfusion]
Replied On May 2, 2005 07:06 PM

I am also doing it in formload event. AS per your suggestion i did coding in CurrentCellStartEditing event and it is working. thanks

Tom Abraham
Replied On May 23, 2005 04:32 PM

I have the same issue in GridControl. In form load, I set _grid.ColStyles(1).ReadOnly = True. However, I can type a character into the "read only" cells that is not saved when I leave the cell. Tom

Administrator [Syncfusion]
Replied On May 23, 2005 05:56 PM

This is a defect in 3.2.1.0. Is that the version you are using? Until the next release, you can use the CurrentCellStartEditing event to avoid this problem.

Tom Abraham
Replied On May 24, 2005 04:52 PM

Yes, I''m using 3.2.1.0.

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.

;