I have web grid column is defined as system.Int. I associated WebNumericEdit to that column that is defined as double no decimals. It seems that if any one enters a number with a decimal I am getting the value false back or the value of that column. I get this even if I change column to double.
I bind the edit to the coulnm withthis code:
e.Layout.Bands(0).Columns.FromKey("Proj_Exp").Type = ColumnType.Custome.Layout.Bands(0).Columns.FromKey("Proj_Exp").EditorControlID = WebNumericEdit1.UniqueIDe.Layout.Bands(0).Columns.FromKey("Proj_Exp").CellStyle.HorizontalAlign = HorizontalAlign.Right
Current column definition from aspx page:
<igtbl:UltraGridColumn BaseColumnName="Proj_Exp" DataType="System.Double" Key="Proj_Exp"> <Header Caption="Proj Expenses"> <RowLayoutColumnInfo OriginX="9" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="9" /> </Footer> </igtbl:UltraGridColumn>
Current WebNumericEdit Definition:
<igtxt:WebNumericEdit ID="WebNumericEdit1" runat="server"> </igtxt:WebNumericEdit>
Current code that returns a value of false(italicized):
For Each udr As UltraGridRow In Me.wgrdJE.Bands(0).Grid.Rows Dim val As DataRow val = dt.NewRow val("L1_Reorg_Seg_Id") = "0001" val("L2_Reorg_Seg_Id") = udr.Cells.FromKey("L2_Reorg_Seg_Id").Value val("L3_Reorg_Seg_Id") = udr.Cells.FromKey("L3_Reorg_Seg_Id").Value val("CBT_Id") = udr.Cells.FromKey("CBT_Id").Value val("Prof_Model_Id") = udr.Cells.FromKey("Prof_Model_Id").Value val("Service_Line_Id") = udr.Cells.FromKey("Service_Line_Id").Value val("PD_NO") = udr.Cells.FromKey("PD_NO").Value val("Gross_rev") = CInt(Round(CDbl(udr.Cells.FromKey("Gross_rev").Value), 0)) val("Proj_Exp") = CInt(udr.Cells.FromKey("Proj_Exp").Value)
val("Direct_Labor") = CInt(Round(CDbl(udr.Cells.FromKey("Direct_Labor").Value), 0)) val("Direct_Fringe") = CInt(Round(CDbl(udr.Cells.FromKey("Direct_Fringe").Value), 0)) val("BP_Labor") = CInt(Round(CDbl(udr.Cells.FromKey("BP_Labor").Value), 0)) val("BP_Fringe") = CInt(Round(CDbl(udr.Cells.FromKey("BP_Fringe").Value), 0)) val("BP_Exp") = CInt(Round(CDbl(udr.Cells.FromKey("BP_Exp").Value), 0)) val("Modified_By") = strUserLogin val("Time_Stamp") = Now dt.Rows.Add(val) Next
I want the number to be an integer. But the numbers the user gets often have decimals in them so I wanted to convert it if they entered it w/ the decimals places. But for some reason i get false back as a value.
Any help would be appreciated.
Thanks
Steve Z