How to get the correct value of an object in the Grid with the version 8.0.7200

3 replies. Last post: June 24, 2013 10:12 PM by Bernard Xiang
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
armore1972Member


Hi to all,

I use WebGrid 8.0.7200.253 RunTime version v2.0.50727.

In my application the decimal separator is "," but in one cell (the discount) i need to have the "." separator ( we need to use discount with numeric after "." for example 33.33) but the customer can insert in the cell both separator "," and "." (in case he insert the "," i replace with the ".").

My aspx page contain this code


<ISWebGrid:WebGridColumn Caption="Discount1" DataMember="speedy_discount1" DataType="System.Decimal"
Name="speedy_discount1" Width="95px" DataFormatString="n" EditType="Custom"
CustomEditorName="NumericUpDown" InputRequired="False" DefaultText="0" DefaultValue="0" CustomEditorProperties="MinValue=0;MaxValue=100">
<CellStyle HorizontalAlign="Right">
</CellStyle>
</ISWebGrid:WebGridColumn>

if i try to insert in my custom object a value like 33.33 i get an correct value, but if i try to insert 33,33 i get this value 3,333.00.

This is the part of the javascript code i use to get the value

function WebGrid1_OnExitEditMode(controlId, tblName, editObject) {

.....

var objectObjectValue;

var colObj = wgGetColumnByElement(editObject.cellElement);
var CustomEditorName = colObj.CustomEditorName;
var CustomEditorObj = grid.CustomEditors[CustomEditorName].ImplementationObject;
objectObjectValue = CustomEditorObj.GetValue();


....
}

In my old version of WebGrid (7.0.7200.403) i don't have this problem and i get the correct value of the object with this simple javascript

var objectObjectValue = editObject.element.value;

if i insert the value 33,33 i get 33,33 and after i can replace "," with ".".

Any one can help me


Thanks in Advance


armore1972

All times are GMT -5. The time now is 8:57 PM.
Previous Next