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

ReadOnly Currency Cell

Thread ID:





98377 Feb 23,2011 07:21 PM UTC Mar 3,2011 01:47 PM UTC WinForms 2
Tags: GridControl
Qingde Shi
Asked On February 23, 2011 07:21 PM UTC

Hi ,

I am using gridcontrol in virtual mode. How to make a cell using CurrencyEidt but is read only, not editable?

Try the following, but it does not work.

e.Style.CellType = GridCellTypeName.Currency;
e.Style.ReadOnly = true;



Qingde Shi
Replied On February 23, 2011 07:33 PM UTC

To make it clearer, when clicking the currency cell, it apprears it changed to editting mode (format and symbol removed), but can not enter value, so it is readonly. but the question is how to make it appears static, clicking the cell does not change its currency format?



Mahendran [Syncfusion]
Replied On March 3, 2011 01:47 PM UTC

Hi Qingde,

Thanks for your interest in Syncfusion products.

You can set the Currency symbol when the cell type as Currency and ReadOnly.You need to handle the CurrentCellStartEditing event handler with respective code. The following code explains the same.

this.gridControl1.CurrentCellStartEditing += new CancelEventHandler(gridControl1_CurrentCellStartEditing);
void gridControl1_CurrentCellStartEditing(object sender, CancelEventArgs e)
GridCurrentCell cc = this.gridControl1.CurrentCell;
if (cc.Renderer is GridCurrencyTextBoxCellRenderer && cc.Renderer.StyleInfo.ReadOnly)
e.Cancel = true;

Please let us know if you ave any concerns.



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