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.
Unfortunately, activation email could not send to your email. Please try again.

Currency cell with different decimal digits per row

Thread ID:

Created:

Updated:

Platform:

Replies:

13614 May 4,2004 08:44 AM Mar 24,2006 12:43 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 4, 2004 08:44 AM

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? TIA, Jose

Administrator [Syncfusion]
Replied On May 4, 2004 09:18 AM

Are you using 2.0.5.0? 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.

Administrator [Syncfusion]
Replied On 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 Thank you >Are you using 2.0.5.0? 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.

Administrator [Syncfusion]
Replied On March 24, 2006 12:43 AM

Hi Raju, 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. Regards, Calvin.

CONFIRMATION

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.

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.

;