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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Focus on read-only cell in GDBG

Thread ID:





28447 May 2,2005 07:07 PM UTC May 24,2005 08:52 PM UTC WinForms 7
Tags: GridControl
Administrator [Syncfusion]
Asked On May 2, 2005 07:07 PM UTC

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 07:25 PM UTC

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 08:27 PM UTC

I am using the version # 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 10:03 PM UTC

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 11:06 PM UTC

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 08:32 PM UTC

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 09:56 PM UTC

This is a defect in 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 08:52 PM UTC

Yes, I''m using


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon