Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. File Upload for each row in GridView

File Upload for each row in GridView

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-nethelp
3 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sudevsu
    wrote on last edited by
    #1

    Hello Experts, Happy New Year! I have a dynamic Grid view which generates rows dynamically. I also have a dropdown in Gridview. On ddlselectedvalue="File" create a new column for existing gridview where user should upload a file and that file should be saved in ASP.NET application "Files" folder. Can anyone please help me with this. Working on this since two days.

    Your help is much appreciated. Thanks Happy Coding!

    S 1 Reply Last reply
    0
    • S sudevsu

      Hello Experts, Happy New Year! I have a dynamic Grid view which generates rows dynamically. I also have a dropdown in Gridview. On ddlselectedvalue="File" create a new column for existing gridview where user should upload a file and that file should be saved in ASP.NET application "Files" folder. Can anyone please help me with this. Working on this since two days.

      Your help is much appreciated. Thanks Happy Coding!

      S Offline
      S Offline
      sudevsu
      wrote on last edited by
      #2

      <asp:GridView ID="gdvItems" runat="server" Visible="true" ShowFooter="true" AutoGenerateColumns="false">
      <Columns >
      <asp:BoundField DataField="ItemNo" HeaderText="ItemNo" />
      <asp:TemplateField HeaderText="TireSize">
      <ItemTemplate>
      <asp:TextBox ID="txtTireSize" runat="server"></asp:TextBox>
      </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="DOT">
      <ItemTemplate>
      <asp:TextBox ID="txtDOT" runat="server"></asp:TextBox>
      </ItemTemplate>
      </asp:TemplateField>

                <asp:TemplateField HeaderText="RemovalArea">
              <ItemTemplate>
                 <%--<asp:TextBox ID="txtReAre" runat="server"></asp:TextBox>--%>
                  <asp:DropDownList ID="ddlRemovalArea" runat="server" OnSelectedIndexChanged="ddlRemovalArea\_SelectedIndevChanged" AutoPostBack="true">
                  <asp:ListItem>-Select-</asp:ListItem>
                   <asp:ListItem>Bead</asp:ListItem>
                   <asp:ListItem>Tread</asp:ListItem>
                   <asp:ListItem>Sidewalk</asp:ListItem>
                   <asp:ListItem>Other</asp:ListItem>
                   <asp:ListItem>Tread life</asp:ListItem>
                   <asp:ListItem>Interior</asp:ListItem>
                  </asp:DropDownList>
              </ItemTemplate>
          </asp:TemplateField>
                  <asp:TemplateField HeaderText="TirePosition">
              <ItemTemplate>
             <%--  <asp:TextBox ID="txtTireposition" runat="server"></asp:TextBox>--%>
                   <asp:DropDownList ID="ddlTirePosition" runat="server">
                    <asp:ListItem>-Select-</asp:ListItem>
                   <asp:ListItem>Left Front</asp:ListItem>
                    <asp:ListItem>Right Front</asp:ListItem>
                     <asp:ListItem>Left Rear</asp:ListItem>
                      <asp:ListItem>Right Rear</asp:ListItem&g
      
      S 1 Reply Last reply
      0
      • S sudevsu

        <asp:GridView ID="gdvItems" runat="server" Visible="true" ShowFooter="true" AutoGenerateColumns="false">
        <Columns >
        <asp:BoundField DataField="ItemNo" HeaderText="ItemNo" />
        <asp:TemplateField HeaderText="TireSize">
        <ItemTemplate>
        <asp:TextBox ID="txtTireSize" runat="server"></asp:TextBox>
        </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="DOT">
        <ItemTemplate>
        <asp:TextBox ID="txtDOT" runat="server"></asp:TextBox>
        </ItemTemplate>
        </asp:TemplateField>

                  <asp:TemplateField HeaderText="RemovalArea">
                <ItemTemplate>
                   <%--<asp:TextBox ID="txtReAre" runat="server"></asp:TextBox>--%>
                    <asp:DropDownList ID="ddlRemovalArea" runat="server" OnSelectedIndexChanged="ddlRemovalArea\_SelectedIndevChanged" AutoPostBack="true">
                    <asp:ListItem>-Select-</asp:ListItem>
                     <asp:ListItem>Bead</asp:ListItem>
                     <asp:ListItem>Tread</asp:ListItem>
                     <asp:ListItem>Sidewalk</asp:ListItem>
                     <asp:ListItem>Other</asp:ListItem>
                     <asp:ListItem>Tread life</asp:ListItem>
                     <asp:ListItem>Interior</asp:ListItem>
                    </asp:DropDownList>
                </ItemTemplate>
            </asp:TemplateField>
                    <asp:TemplateField HeaderText="TirePosition">
                <ItemTemplate>
               <%--  <asp:TextBox ID="txtTireposition" runat="server"></asp:TextBox>--%>
                     <asp:DropDownList ID="ddlTirePosition" runat="server">
                      <asp:ListItem>-Select-</asp:ListItem>
                     <asp:ListItem>Left Front</asp:ListItem>
                      <asp:ListItem>Right Front</asp:ListItem>
                       <asp:ListItem>Left Rear</asp:ListItem>
                        <asp:ListItem>Right Rear</asp:ListItem&g
        
        S Offline
        S Offline
        sudevsu
        wrote on last edited by
        #3

        Alright! I did not achieve what I actually want. But I did code silly simple solution like each row will have a column browse. But If ddlselected="Tread life" Then browse File is required. or else Grid with column is empty. I did not like the idea. Disappointed. :| :| :|

        Your help is much appreciated. Thanks Happy Coding!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups