Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net loop through GridView and gather Template column textbox values and tooltip

Hi

I have an ASP.net Gridview that contains Template TextBox columns
I want to loop through and check the text box text and tooltip text
How do I do this in the following code? The sort of template columns are shown
below

            For i As Integer = 0 To Me.GridView1.Columns.Count - 1
                oColIndex = i + 2
                For r As Integer = 0 To Me.GridView1.Rows.Count - 1
                           'I need to gather the text box value and tooltip here
                Next r
            Next i

Open in new window


     <asp:TemplateField HeaderText="D1" Visible="false" ItemStyle-Wrap="true" >
                           <ItemTemplate>
                                <asp:Textbox ID="D1" runat="server"  Visible="true" Width="20"></asp:Textbox>
                           </ItemTemplate>
                      </asp:TemplateField>
                      <asp:TemplateField HeaderText="D2" Visible="false" ItemStyle-Wrap="true" >
                           <ItemTemplate>
                                <asp:Textbox ID="D2" runat="server"  Visible="true" Width="20" ></asp:Textbox>
                           </ItemTemplate>
                      </asp:TemplateField>
                     <asp:TemplateField HeaderText="D3" Visible="false" ItemStyle-Wrap="true">
                           <ItemTemplate>
                                <asp:Textbox ID="D3" runat="server"  Visible="true" Width="20" ></asp:Textbox>
                           </ItemTemplate>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Obadiah Christopher
Obadiah Christopher
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much