Using a GDBG with a currency column where for each row it could have different number of decimal digits.
I''m currently using PrepareViewStyleInfo to setup the currency cell before it is edited, if the number of decimal digits are different than the original currency model, unexpected results are produced because "for some reason" the currency cell textbox does not allow you to override any currency setting.
Part of the logic we have implemented allows you to display the currency value with x decimal digits, while if the user is editing the number of decimal digits could be different.
I have tried to use the InitCurrencyEditProperties method in the CurrencyModel but once the CurrencyTextBox is created none of the currency settings can be changed.
Is there any other way to implement this?
ADAdministrator Syncfusion Team May 4, 2004 08:18 AM
Are you using 126.96.36.199? There were problems with the currency cell not recognizing formats when editing in the betas.
Can you post a small sample shwoing what you are doing? That way, we can try to suggest something that will fit into how you are doing things.
ADAdministrator Syncfusion Team March 23, 2006 03:43 PM
I am using 3.2.1 DataBoundGrid with Currency cell and I need to have different amount of decimal digits for different rows ( same column)
I am using this code to set it :
if (e.RowIndex > _grid.DataBoundGridModel.Rows.HeaderCount && e.ColIndex >_grid.DataBoundGridModel.Cols.HeaderCount )
string orderID =string.Empty;
orderID = this._grid[e.RowIndex, this._colIndexOrderID].Text;
if ( orderID.Length == 0 ) return ;
if ( e.Style.CellType == "Currency")
orderID = _grid.DataBoundGridModel[e.RowIndex, this._colIndexOrderID].Text ;
int precision = 4;
if ( e.ColIndex == this._colIndexConfirmRate )
precision = this.GetClientRatePrecision(orderID);
e.Style.CurrencyEdit.CurrencyNumberDigits = precision;
it seems to have no effect on precision, it still comes with precision set on initialition
>Are you using 188.8.131.52? There were problems with the currency cell not recognizing formats when editing in the betas.
>Can you post a small sample shwoing what you are doing? That way, we can try to suggest something that will fit into how you are doing things.
ADAdministrator Syncfusion Team March 24, 2006 12:43 AM
The e.Style.CurrencyEdit.CurrencyDecimalDigits property must be set to specify the maximum number of digits for the decimal portion. Please let us know if you have any further queries.