Hello
i have a problem with Radgrid and RadNumericTextBox
i am using a EditFormType Template that user updates only 2 values
from the selected row of gridview.
inside that template i am using a RadNumericTextBox to let user insert a
desired numeric value...
the problem is that when i hit the Update button , NULL value is stored in
database....If i use a standart
asp textbox the value is stored fine.
Could somebody help?
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1" GridLines="None" PageSize="100" ShowGroupPanel="True" Skin="Default"> <ClientSettings AllowDragToGroup="True"> <Selecting AllowRowSelect="True" /> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> <MasterTableView autogeneratecolumns="False" datakeynames="ic" datasourceid="SqlDataSource1" EditMode="PopUp" GroupLoadMode="Client"> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldAlias="symbasi" FieldName="symbasi" /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="symbasi" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn AllowFiltering="false" Visible="false" UniqueName="ic" HeaderText="ic" DataField="ic"> <HeaderStyle Width="60px"></HeaderStyle> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="Symbasi" HeaderText="Σύμβαση" DataField="Symbasi"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="Logar" HeaderText="Λογαριασμός" DataField="Logar"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="asset_class" HeaderText="Asset Class" DataField="asset_class"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="poso" HeaderText="Ποσό" DataField ="poso" dataFormatString="{0:###,##0.00}" > </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="pososto" HeaderText="Ποσοστό" DataField="pososto" dataFormatString="{0:###,##0.00}" > </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="Ekptosi" HeaderText="Εκπτωση" DataField="Ekptosi" dataFormatString="{0:###,##0.00}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="Total" HeaderText="Total" DataField="Total" dataFormatString="{0:###,##0.00}"> </telerik:GridBoundColumn> </Columns> <EditFormSettings InsertCaption="Add new item" CaptionFormatString="ic: {0}" CaptionDataField="ic" EditFormType="Template" PopUpSettings-Modal="true"> <EditColumn FilterControlAltText="Filter EditCommandColumn column"> </EditColumn> <FormTemplate> <table ID="Table1" border="0" cellpadding="1" cellspacing="1" width="250"> <tr> <td> Ποσό: </td><td> <asp:TextBox ID="TextBox1" Enabled="false" runat="server" Text='<%# Bind("poso","{0:0.00}") %>' > </asp:TextBox></td></tr><tr> <td> ΕΚΠΤΩΣΗ: </td><td> <telerik:RadNumericTextBox ID="TextBox10" DbValue='<%# Convert.ToDouble(Eval("Ekptosi")) %>' runat="server" ShowSpinButtons="true" MinValue="0" MaxValue='<%# Convert.ToDouble(Eval("poso")) %>'> <ClientEvents OnKeyPress="NumericTextBoxOnLoad" /> </telerik:RadNumericTextBox> </td></tr><tr> </tr><tr> </tr></table><table style="width: 100%"> <tr> <td align="right" colspan="2"> <asp:Button ID="Button1" runat="server" CommandName="Update" Text="Update" /> <asp:Button ID="Button2" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView> </telerik:RadGrid>