Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello,
I have a Gridview GDAddBooking. and few Temp filed with Textboxes. I have another textbox outside the Gridview.
Now I want to Add gridview Rows Dynamically depends on the value of the Textbox.
How can it be possible?
XML
<asp:GridView ID="GDAddBooking" runat="server" align="center" AllowPaging="True"
                           AutoGenerateColumns="false" CellPadding="4" ShowHeaderWhenEmpty="true">
                          <Columns>
                              <asp:TemplateField HeaderText="Project ID">
                                  <ItemTemplate>
                                      <asp:TextBox ID="txtProjectID" runat="server"></asp:TextBox>
                                  </ItemTemplate>
                              </asp:TemplateField>
                              <asp:TemplateField HeaderText="Booking 1">
                                  <ItemTemplate>
                                      <asp:TextBox ID="txtBooking1" runat="server"></asp:TextBox>
                                  </ItemTemplate>

                              </asp:TemplateField>
                              <asp:TemplateField HeaderText="Booking 2">
                                  <ItemTemplate>
                                      <asp:TextBox ID="txtBooking2" runat="server"></asp:TextBox>
                                  </ItemTemplate>

                              </asp:TemplateField>
                              <asp:TemplateField HeaderText="Booking 3">
                                  <ItemTemplate>
                                      <asp:TextBox ID="txtBooking3" runat="server"></asp:TextBox>
                                  </ItemTemplate>

                              </asp:TemplateField>
                          </Columns>
                       </asp:GridView>
Posted

 
Share this answer
 
v2
Comments
SumitChandra 24-Dec-13 3:22am    
Thanks to you...both are useful
 
Share this answer
 
Comments
SumitChandra 24-Dec-13 3:23am    
Yes.....you'r right....Thanks buddy....for the help :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900