This is a migrated thread and some comments may be shown as answers.

Manipulate hierarchy items (not on nested grid but on view template) on the client

2 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sal
Top achievements
Rank 1
Sal asked on 11 Aug 2011, 03:23 PM
My problem is, I believe simple. I want to be able to acces some texboxes that are included in a nestedviewtemplate of a grid hierarchy.
The template includes a formview, which includes a tabstrip whose pages will have the textboxes. These textboxes will be in read only mode until an "edit" button - also part of the pageview - is clicked. At that time, I want to turn all textboxes to be editable (readOnly=false) and be able to access the their values. After clicking on a save button, which will be made visible at that time, then the values will be saved to the database via web services.

Anyway, the main grid I have is the following, simplified for clarity:

<telerik:RadGrid ID="OrbitRadGrid" runat="server" >
    <MasterTableView
        <NestedViewTemplate>
            <asp:FormView ID="FormView" runat="server" ViewStateMode="Enabled" DataSourceID="ObjectDataSource1">
                <ItemTemplate>
                    <asp:Panel ID="NestedViewPanel" runat="server" CssClass="viewWrap" Width="1000px">
                        <telerik:RadTabStrip runat="server" ID="TabStip" MultiPageID="Multipage" SelectedIndex="0">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="General" PageViewID="General"/>
                                <telerik:RadTab runat="server" Text="Status" PageViewID="Status"/>
                              </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage runat="server" ID="Multipage" SelectedIndex="0">
                            <telerik:RadPageView runat="server" ID="Genearal">
                                <ul style="padding-left: 30px; padding-top: 3px; padding-bottom: 3px">
                                    <li>
                                        <telerik:RadTextBox ID="NameTextBox" Text='<%# Eval("ItemName") %>' 
                                            Label="Name:" LabelCssClass="InfoLabelsClass"  
                                            ReadOnly="true" runat="server">
                                        </telerik:RadTextBox>
                                    </li>
                                    <li>
                                        <telerik:RadTextBox ID="SourceTextBox" Text='<%# Eval("ItemSource") %>' 
                                            Label="Source:" LabelCssClass="InfoLabelsClass"
                                            ReadOnly="true" runat="server">
                                        </telerik:RadTextBox>
                                    </li>
                                           .......
                                           .......
                              </Telerik:RadMultiPage>
                               <asp:Button runat="server" ID="EditBtn" Text="Edit" ></asp:Button>
                       </asp:Panel>
                </ItemTemplate>
            </asp:FormView>                  
        </NestedViewTemplate>
        ........
        ........

So how can I access the textboxes as well as any other controls I may embed inside the TabStrip's PageViews from my template once I click on the edit button?

Thanks

Sal

2 Answers, 1 is accepted

Sort by
0
Accepted
Mira
Telerik team
answered on 16 Aug 2011, 11:32 AM
Hello Sal,

I have followed your scenario and prepared a sample project for you demonstrating how the desired functionality can be implemented. You can find it attached to this message.

I hope it helps.

Regards,
Mira
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Sal
Top achievements
Rank 1
answered on 18 Aug 2011, 07:20 PM
Thank you Mira
Tags
Grid
Asked by
Sal
Top achievements
Rank 1
Answers by
Mira
Telerik team
Sal
Top achievements
Rank 1
Share this question
or