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

ButtonCell with Formula nd ediatable

Hi, I have a cell which is basically of type "FormulaCell". Would it possible to achieve the following? If answer is yes then How would be do that. " a read-only cell of type "Formula." but i would like to provide a button (like three ...) to make cell editable. So if they click on button in the cell they can enter the value. But if they click the same button again it become once again a type of "formula" and read only. " I understand one thing here that when they will edit a cell formula will go away. but when they click again we need to set the formula again. I am sure somebody must have done this. Please help me this. Thanks

1 Reply

AD Administrator Syncfusion Team May 28, 2004 07:22 PM UTC

I think this would be doable. You could take the Ellipsis cell code from \grid\samples\in depth\cellbutons sample. The ellipsis cell there is derive from GridTextBoxCellRenderer and GridTextBoxCellMocel. You could change the base classes to GridFormulaCellRenderer and GridFormulaCellModel. You would set teh style.ReadOnly = true originally, and when you handel the cellbutton click, you could flip this style value. Note: To change any style that has been set ReadOnly, you need to first set grid.IgnoreReadOnly = true, chnage teh style, then set the IgnoreReadOnly back to false.

Loader.
Up arrow icon