QS
Qingde Shi
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?
Thanks,
Q
MA
Mahendran
Syncfusion Team
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.
Regards,
R.Mahendran