InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


retriving values from nested grid... Expand / Collapse
Author
Message
Posted 24/06/2008 18:18:57
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 24/06/2008 20:41:36
Posts: 1, Visits: 9
Hi all,

             I am populating a nested grid view (grid view inside grid view)

Its populating threw the coding perfectly but when I am retrieving threw that loop of master grid and child grid the vales are not retrieving properly
I believe some one can help me in my code I am mentioning here and plz guid me iam doing rite or not

Thanks in advance

Rengith

            <Columns>
                <asp:TemplateField HeaderText="col1" >
               
                    <ItemTemplate>
                        <table width="100%" border="0" cellspacing="1" cellpadding="0" >
                            <tr>
                                                         
                                <td >
                                        <%#DataBinder.Eval(Container.DataItem, "ASCM_CATEGORY_DESC")%>
                                        </td>
                                </tr>
                           
                           
                            <tr>
                                <td style="width: 127px; height: 19px">
                                    <asp:GridView ID="grdV_products" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" GridLines="None" ShowHeader="False" Width="877px" AllowPaging="True" HorizontalAlign="Left" PageIndex="2" >
                                        <Columns>
                                           
                                                 <asp:TemplateField HeaderText="col1">
                                               
                                            </asp:TemplateField>
                                           
                                            <asp:TemplateField HeaderText="col2">
                                           
                                                <ItemTemplate>
                                                   <td style="width: 300px; height: 19px">
                                                 
                                                    <%#DataBinder.Eval(Container.DataItem, "ASQM_QUESTION_DESC")%>
                                                   </td>                                                    
                                                </ItemTemplate>
                                               
                                            </asp:TemplateField>
                                           
                                            <asp:TemplateField HeaderText="rad1"></asp:TemplateField>
                                            <asp:TemplateField HeaderText="rad2">
                                                <ItemTemplate>
                                                    <asp:RadioButton ID="RadioButton1" runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="rad3">
                                                <ItemTemplate>
                                                    <asp:RadioButton ID="RadioButton2" runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="rad4">
                                                <ItemTemplate>
                                                    <asp:RadioButton ID="RadioButton3" runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="rad5">
                                                <ItemTemplate>
                                                    <asp:RadioButton ID="RadioButton4" runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <RowStyle BackColor="#EFF3FB" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <EditRowStyle BackColor="#2461BF" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
               
               
            </Columns>


=========================================================
Function GetSelected_aid()
        Dim straid As String = "-1"
        Dim i As Integer = 0
        Dim gvInner As GridView
        Dim x As String

        For i = 0 To grdV_categories.Rows.Count - 1
            gvInner = CType(grdV_categories.Rows(i).FindControl("grdV_products"), GridView)
            If Not gvInner Is Nothing Then

                straid = grdV_categories.Rows(i).Cells(0).Text.ToString
                'Also if u want data of inner grig loop it again on gvInner

                For j As Integer = 0 To gvInner.Rows.Count - 1
                    x = gvInner.Rows(i).Cells(1).Text.ToString
                Next

            End If



        Next


        Return straid

    End Function
Post #14001
« Prev Topic | Next Topic »

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 1:51am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 12 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.