Hi all,
I'm using webdatagrid to display a number of customer order items.
For each row, i've got a "Quantity" column. But for each row, i can have a different input mask for the "Quantity" column.
Like :
Row 1 : Quantity = 12.3 -> so i can only enter one number or less after the coma
Row 2 : Quantity = 13.44 -> i can only enter two numbers or less after the coma
Row 3 : Quantity = 10 -> there is no number after the coma
I've got a property for each row in my datasource where i store the number of decimals.
I don't know how to do that with webdatagrid. I found the WebMaskEditor but it seems to work only for the entire column and not for each specific cell.
Thank you for your help.
Hello fmoll,
Thank you for the update.
Let us know if you need further assistance.
Hello,
Thank you for your answer.
In fact, i found a workaround yesterday.
First, i'm using the InitializeRow event to round my cell value (based on my decimal value).
Second, i'm using the client events ExitedEditMode and EnteringEditMode to round my cell value.
It's not perfect but i've got the expected result :)
Editor providers are used for the entire column and not for each specific cell.
Also if your column type is Decimal you cannot use MaskEditorProvider.
You will get "The editor does not support the column type. " error.
About decimal columns you can use NumericEditorProvider.
You can handle EnteringEditMode client event of the CellEditing behavior.
But the MaxDecimalPLaces property can be set only when the control has no focus.
You can set maxLength but it is regarding both decimal and non decimal values.
Let me know if you need further assistance regarding this.
None have faced a problem like mine ?