The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team May 4, 2004 01:18 PM UTC
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.
ADAdministrator Syncfusion Team March 23, 2006 08:43 PM UTC
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.
ADAdministrator Syncfusion Team March 24, 2006 05:43 AM UTC
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.