File Upload for each row in GridView
-
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!
-
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!
<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
-
<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
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!