Currency View in Grid

Dec 9, 2009 at 4:15 PM

Hi there,

Recently surfing in the web, I found this tool and is amazing.

I am looking the way to view in a cell numbers with currency format,  the TextBoxCurrency class works fine when I am editing the cell, but the first time when I do the data load from the numbers are with the currency format.

Any information about this concerns will be appreciated.


Karim - Mexico

Dec 10, 2009 at 12:11 AM

Hi all,

I found the solution.

the value passed to the cell must be decimal as editor type.

I did the conversion and works fine,




Dec 10, 2009 at 11:54 PM

Please, if you can, put a little code example to make this topic better! :-)

Dec 14, 2009 at 4:52 PM


// Instantiating a TextBox for editing

SourceGrid.Cells.Editors.TextBox numCurr = new SourceGrid.Cells.Editors.TextBox(typeof(decimal));
numCurr.TypeConverter = new DevAge.ComponentModel.Converter.CurrencyTypeConverter(typeof(decimal));

// Converting as Decimal the datarow value

grid1[nSubRow, nCols] = new SourceGrid.Cells.Cell(Convert.ToDecimal(drMat[cTag].ToString()));
grid1[nSubRow, nCols].Editor = numCurr;

// Text alignment to the right as number.

oCell.TextAlignment = DevAge.Drawing.ContentAlignment.MiddleRight;
grid1[nSubRow, nCols].View = oCell;


Dec 17, 2009 at 4:21 AM