While I'm at it . . .
I have an edit form template which is nested in a panel bar. I'm having trouble accessing the form objects in the template from the code behind. Here is the panel bar/grid/template:
| <telerik:RadPanelBar runat="server" ID="panelDisputeHistory" Skin="Web20" Width="98%"> |
| <CollapseAnimation Type="None"></CollapseAnimation> |
| <Items> |
| <telerik:RadPanelItem Text="Dispute History" Expanded="False"> |
| <Items> |
| <telerik:RadPanelItem Text="" Value="pnlItemDisputeHistory"> |
| <ItemTemplate> |
| <div> |
| <!-- Begin dispute history section --> |
| <telerik:RadGrid ID="grdDisputes" runat="server" DataSourceID="sqlDisputes" Skin="Default" |
| AllowPaging="false" AllowSorting="True" |
| FilterItemStyle-HorizontalAlign="center" Width="700px" Height="400px" |
| ShowStatusBar="false" GridLines="Both" |
| AutoGenerateColumns="False" HeaderStyle-Font-Size="X-Small" HorizontalAlign="NotSet" |
| OnUpdateCommand="grdDisputes_UpdateCommand" CommandItemDisplay="Top" |
| OnInsertCommand="grdDisputes_InsertCommand" OnDeleteCommand="grdDisputes_DeleteCommand" OnItemDataBound="grdDisputes_ItemDataBound"> |
| <MasterTableView DataSourceID="sqlDisputes" PageSize="50" |
| Width="700px" DataKeyNames="ID" ItemStyle-Font-Size="X-Small"> |
| <Columns> |
| </Columns> |
| <EditFormSettings EditFormType="Template"> |
| <EditColumn uniquename="EditCommandColumn1"></EditColumn> |
| <FormTemplate> |
| <table width="100%" cellpadding="2" cellspacing="2" border="0" class="standard_table_no_border"> |
| <tbody> |
| <tr> |
| <td style="" colspan="3">Invoice Amount |
| <asp:TextBox ID="txtInvoiceAmt" runat="server" width="50" Font-Size="X-Small" Text='<%#Eval("INVOICE_AMT", "{0:n2}") %>'></asp:TextBox> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </FormTemplate> |
| <PopUpSettings ScrollBars="None" /> |
| </EditFormSettings> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <!-- End dispute section --> |
| </div> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelItem> |
| </Items> |
| <ExpandAnimation Type="None"></ExpandAnimation> |
| </telerik:RadPanelBar> |
I've tried a dozen different ways of accessing txtInvoiceAmt, none with success. The basis of my attempts is some form of:
| TextBox txtInvoiceAmt = (TextBox)panelDisputeHistory.FindItemByValue("pnlItemDisputeHistory").FindControl("grdDisputes").FindControl("txtInvoiceAmt"); |
Nothing seems to work. Any ideas?
Thanks again.
Rich