Folks,
I am using RadControls for ASP.NET AJAX Q2 2009 SP1 with Visual Studio 2008 SP1, IE7 and WinXP SP3.
I am using Form Template. I have a Rad Combo Box Template Column name Budget that is Decimal Type. My question is that how do I capture the value of that Template column in RadGrid1_UpdateCommand? Basically In RadGrid1_UpdateCommand, I want to store the Value of Template Column Budget into SqlDataSource4.UpdateParameters["Budget "].DefaultValue .
I know how to capture the Template value if it is string type based on below post from Shinu. But I am having some difficulty to retrieve the Decimal Data Type Value.
Shinu's Post:
http://www.telerik.com/community/forums/aspnet-ajax/combobox/how-to-capture-radcombo-selected-items-from-multicolumn-radcombo.aspx
Below is my code. Any help will be appreciated. Thanks..
GC_0620
I am using RadControls for ASP.NET AJAX Q2 2009 SP1 with Visual Studio 2008 SP1, IE7 and WinXP SP3.
I am using Form Template. I have a Rad Combo Box Template Column name Budget that is Decimal Type. My question is that how do I capture the value of that Template column in RadGrid1_UpdateCommand? Basically In RadGrid1_UpdateCommand, I want to store the Value of Template Column Budget into SqlDataSource4.UpdateParameters["Budget "].DefaultValue .
I know how to capture the Template value if it is string type based on below post from Shinu. But I am having some difficulty to retrieve the Decimal Data Type Value.
Shinu's Post:
http://www.telerik.com/community/forums/aspnet-ajax/combobox/how-to-capture-radcombo-selected-items-from-multicolumn-radcombo.aspx
Below is my code. Any help will be appreciated. Thanks..
GC_0620
| <DetailTables> |
| <telerik:GridTableView runat="server" DataSourceID="SqlDataSource4" DataKeyNames="JobPersonID" |
| ShowHeader ="true" Width="100%" CommandItemDisplay= "TopAndBottom" Name = "Detail" |
| AllowAutomaticDeletes="true" AllowAutomaticInserts="true" onupdatecommand="RadGrid1_UpdateCommand" |
| AllowAutomaticUpdates="true" BorderColor="#BC9A10" GridLines="None"> |
| <ParentTableRelation> |
| <telerik:GridRelationFields DetailKeyField="PersonId" MasterKeyField="PersonTableID" /> |
| </ParentTableRelation> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn > |
| <HeaderStyle Width="20px" ForeColor="Aqua" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| '''' |
| <telerik:GridBoundColumn DataField="PositionControlNum" HeaderText="Position Control#" HeaderStyle-Width="50%" |
| SortExpression="PositionControlNum" UniqueName="PositionControlNum" > |
| <HeaderStyle Width="50%"></HeaderStyle> |
| </telerik:GridBoundColumn> |
| '''' |
| </Columns> |
| <EditFormSettings EditFormType="Template"> |
| <EditColumn UniqueName="EditCommandColumn1"></EditColumn> |
| <FormTemplate> |
| <table id="Table1a" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" |
| style="border-collapse: collapse; background: white;"> |
| <tr class="EditFormHeader"> |
| <td colspan="2"> |
| <asp:Label ID="UserJobLabel" |
| CssClass="form-local_Headers" runat="server" Text="User Job Details" |
| Font-Underline="True" |
| ></asp:Label> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| </td> |
| <tr> |
| <td> |
| Position Control#</td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBoxPositionControl" runat="server" |
| DataSourceID="SqlDataSource5" DataTextField="PositionControlNum" DataValueField="PositionControlNum" |
| DropDownWidth="599px" Height="110px" HighlightTemplatedItems="true" |
| MarkFirstMatch="true" |
| SelectedValue='<%#Bind("PositionControlNum") %>' Width="600px" |
| > |
| <HeaderTemplate> |
| <table cellpadding="0" cellspacing="0" style="width: 565px"> |
| <tr> |
| <td style="width: 105px;"> |
| Position Control#</td> |
| <td style="width: 75px;"> |
| Budget</td> |
| '' |
| '' |
| </tr> |
| </table> |
| </HeaderTemplate> |
| <ItemTemplate> |
| <table cellpadding="0" cellspacing="0" style="width: 565px"> |
| <tr> |
| <td style="width: 105px;"> |
| <%# DataBinder.Eval(Container.DataItem, "PositionControlNum") %> |
| </td> |
| <td style="width: 75px;"> |
| <%# DataBinder.Eval(Container.DataItem, "Budget", "{0:N2}")%> |
| </td> |
| '' |
| '' |
| </tr> |
| </table> |
| </ItemTemplate> |
| </telerik:RadComboBox> |
| </td> |
| <tr> |
| <td> |
| </td> |
| <td> |
| <asp:Label ID = "FormTemplate_Label" runat = "server"></asp:Label> |
| </td> |
| <td> |
| </td> |
| <td align="right" colspan="2"> |
| <asp:Button ID="btnUpdate" runat="server" CssClass="form-button" |
| CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' |
| Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' |
| /> |
| |
| <asp:Button ID="btnCancel" runat="server" CausesValidation="False" CssClass="form-button" |
| CommandName="Cancel" Text="Cancel" /> |
| </td> |
| </tr> |
| </tr> |
| </table> |
| </FormTemplate> |
| </EditFormSettings> |
| </telerik:GridTableView> |
| <DetailTables> |
| '''' |
| <asp:SqlDataSource ID="SqlDataSource4" runat="server" |
| ConnectionString="<%$ ConnectionStrings:My_AuthorizationConnectionString %>" |
| SelectCommand=" ...." |
| DeleteCommand="..." |
| InsertCommand="..." |
| UpdateCommand="..." |
| <UpdateParameters> |
| <asp:Parameter Name="PositionControlNum" Type="String" /> |
| <asp:Parameter Name="Budget" Type="Decimal" /> |
| '''' |
| </UpdateParameters> |
| <InsertParameters> |
| '''' |
| </InsertParameters> |
| </asp:SqlDataSource> |