You must Sign In to post a response.
  • Category: ASP.NET

    How to Create Dynamic Text Box Horizontally in GridView and How to Bind the Records Horizontally

    Hi, Developers

    I want to know how to Create Dynamic Gridview TextBoxes Horizontally.(Top to Bottom)

    And also how to bind it Horizontally in GridView.(Top to Bottom)

    Anyone know please help me to i am done this task.

    Thanks With
    Paul.S
  • #765214
    Hi,
    Try adding textbox and binding values to it in design time with ItemTemplate as follows:
    <asp:GridView ID="gvDemo" runat="server">
    <Columns>
    <asp:TemplateField>
    <ItemTemplate>
    <asp:TextBox runat="server" ID="txtDemo" Text='<%#Eval("ABC") %>'></asp:TextBox>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    Or you may find valuable information over here:
    http://www.codeproject.com/Articles/13462/How-to-create-template-columns-dynamically-in-a-gr
    Hope it helps.
    Regards,
    Shashikant Gurav
    shashikantgurav22@gmail.com

  • #765225
    Horizontally means ? do you want to feel them Row wise or do you want to add a column of Textboxes and bind data in it,
    Please elaborate.
    You can add dynamic columns in gridview (column wise), it is called as template column
    look at below link
    http://www.codeproject.com/Articles/13462/How-to-create-template-columns-dynamically-in-a-gr
    http://aspalliance.com/1125_Dynamically_Templated_GridView_with_Edit_Delete_and_Insert_Options.3

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]


Sign In to post your comments