Hi,
Currently I am using webdaatagrid to show records in the grid. The problem that I am facing is that when I click the cell to enter value the number gets divided by 100.
For ex- 5.5 is displayed as 0.05 and 10,992 is displayed as 10992.00 and 256 as 2.56.Why is this happening so? What needs to be done to fix this?
Hello Prabhakar,
Thank you for contacting Infragistics!
I have some follow up questions concerning this matter:
How are you setting up the grid?How are you setting up the editor?What version are you using?
I am using Webdatagrid v12. Below is the code. Which editor providers should be used?
<ig:WebDataGrid ID="dgCompanyStats" runat="server" Height="600px" Width="900px" AutoGenerateColumns="False" ClientEvents-DoubleClick="dg_CompanyStats_CellClickHandler" DataKeyFields="CS_ID" EnableDataViewState="True" OnInitializeRow="dgCompanyStats_InitializeRow"> <EditorProviders> <ig:NumericEditorProvider ID="WebDataGrid1_NumericEditorProvider1"> <EditorControl ClientIDMode="Predictable" DataMode="Float" MaxDecimalPlaces="2" MinDecimalPlaces="2" ValueText="0" > </EditorControl> </ig:NumericEditorProvider> </EditorProviders> <Columns> <ig:BoundDataField DataFieldName="cs_id" Key="cs_id" Hidden="true"> </ig:BoundDataField> <ig:BoundDataField DataFieldName="cs_picture" Key="cs_picture" Hidden="true"> </ig:BoundDataField> <ig:BoundDataField DataFieldName="cs_num" Key="cs_num" Width="25px"> <Header Text="#"></Header> </ig:BoundDataField> <ig:UnboundField Key="Notes" Width="30px" Footer-Text="..."> <Header Text="Notes" /> <Footer Text="..."></Footer> </ig:UnboundField> <ig:BoundDataField DataFieldName="cs_name" Key="cs_name" Width="300px"> <Header Text="Name"></Header> </ig:BoundDataField> <ig:BoundDataField DataFieldName="cs_desc" Key="cs_desc" Width="150px" Hidden="true"> <Header Text="Name"></Header> </ig:BoundDataField> <ig:BoundDataField DataFieldName="MI_YEAR_1" Key="MI_YEAR_1" DataType="System.String" CssClass="Right"> <Header Text=""></Header> </ig:BoundDataField> <ig:BoundDataField DataFieldName="MI_YEAR_2" Key="MI_YEAR_2" DataType="System.String" CssClass="Right"> <Header Text=""></Header> </ig:BoundDataField> <ig:BoundDataField DataFieldName="MI_YEAR_3" Key="MI_YEAR_3" DataType="System.String" CssClass="Right"> <Header Text=""></Header> </ig:BoundDataField> <ig:BoundDataField DataFieldName="MI_YEAR_4" Key="MI_YEAR_4" DataType="System.String" CssClass="Right"> <Header Text=""></Header> </ig:BoundDataField> <ig:BoundDataField DataFieldName="MI_YEAR_5" Key="MI_YEAR_5" DataType="System.String" CssClass="Right"> <Header Text=""></Header> </ig:BoundDataField> <ig:BoundDataField DataFieldName="NUM_NOTES" Key="NUM_NOTES" DataType="System.String" Hidden="true"> <Header Text=""></Header> </ig:BoundDataField> </Columns> <Behaviors> <ig:EditingCore AutoCRUD="False"> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="cs_num" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="Notes" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="cs_name" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="cs_picture" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="cs_id" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="MI_YEAR_1" ReadOnly="False" EditorID="WebDataGrid1_NumericEditorProvider1" /> <ig:EditingColumnSetting ColumnKey="MI_YEAR_2" ReadOnly="False" /> <ig:EditingColumnSetting ColumnKey="MI_YEAR_3" ReadOnly="False" /> <ig:EditingColumnSetting ColumnKey="MI_YEAR_4" ReadOnly="False" /> <ig:EditingColumnSetting ColumnKey="MI_YEAR_5" ReadOnly="False" /> </ColumnSettings> <CellEditingClientEvents ExitedEditMode="dgCompanyStats_CellEditing_ExitedEditMode" /> <EditModeActions EnableOnKeyPress="True" MouseClick="Single" EnableOnActive="False" /> </ig:CellEditing> </Behaviors> </ig:EditingCore> <ig:Activation> </ig:Activation> <ig:Selection CellClickAction="Row" RowSelectType="Single"> </ig:Selection> <ig:RowSelectors> <RowSelectorClientEvents RowSelectorClicked="RowSelectionChanging" /> </ig:RowSelectors> </Behaviors> </ig:WebDataGrid>