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. Image for the cookie policy date
close icon

GridControl CellValue or Text Change

I have a grid with 8 columns. 2 of the columns are editable, the others are populated based on the entry of the other 2 columns. Column 5 is a quantity and column 6 is a weight that is calculated based on the the column 5 quantity and the weight in inventory. The problem is after the value in column six is changed, if a mistake is made in column 5, just editing column 5 does not change column 6. This column seams to be locked once a value has been established. I need to be able to change this value on the fly based on keydown or keypress in column 5.

2 Replies

JA James September 6, 2007 05:20 PM UTC

Ok. I figured it out. The ReadOnly was causing the change to not take effect. That is a major problem. I need the field to be readonly to the user, but not to code. Can this happen?

>I have a grid with 8 columns. 2 of the columns are editable, the others are populated based on the entry of the other 2 columns. Column 5 is a quantity and column 6 is a weight that is calculated based on the the column 5 quantity and the weight in inventory. The problem is after the value in column six is changed, if a mistake is made in column 5, just editing column 5 does not change column 6. This column seams to be locked once a value has been established. I need to be able to change this value on the fly based on keydown or keypress in column 5.


RA Rajagopal Syncfusion Team September 6, 2007 05:51 PM UTC

Hi James,

You need to set the grid.IgnoreReadOnly to true, before you try to programatically change any style properties for cells that are readonly. After making the changes to the cell, set the ReadOnly property of the particular cell to false/true and again set back the IgnoreReadOnly property to false.

Please refer to the following KB link for more information on setting properties for the ReadOnly cells.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=338

Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon