Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0 C#3.0 C++ C C# ASP ASP.NET HTML , +
hi friends

there is a item template in my gridview where in item template there is a textbox..
in textbox some values are displaying but not from database it can be changed dynamicaly by the user

my question is how to get the values inserted by the user in each row and display in another gridview in another page....
<asp:GridView ID="GridView1" runat="server" ShowHeader="False" Width="577px" EmptyDataText="There is Nothing in your Gridview"
            AutoGenerateColumns="False" BackColor="White" BorderColor="White" BorderStyle="Ridge"
            BorderWidth="2px" CellPadding="5" CellSpacing="1" GridLines="None" 
            OnRowCommand="GridView1_RowCommand" DataKeyNames="ProductId" 
            <rowstyle backcolor="#DEDFDE" forecolor="Black" cssclass="gg" />
            &lt;asp:BoundField DataField="ProductName" SortExpression="ProductName" /&gt;
            &lt;asp:BoundField DataField="ProductLogDesc" SortExpression="ProductLogDesc" /&gt;
            &lt;asp:BoundField DataField="ProductCost" SortExpression="ProductCost" /&gt;
                    &lt;asp:TextBox ID="txtQuantity" Columns="5" Text='&lt;%# Eval("Quantity") %&gt;' runat="server"&gt;
                    &lt;asp:LinkButton runat="server" ID="btnRemove" Text="Remove" CommandName="Remove"
                        CommandArgument='&lt;%# Eval("ProductId") %&gt;' Style="font-size: 12px;"&gt;
        &lt;footerstyle backcolor="#C6C3C6" forecolor="Black" /&gt;
        &lt;pagerstyle backcolor="#C6C3C6" forecolor="Black" horizontalalign="Right" /&gt;
        &lt;SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /&gt;
        &lt;HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /&gt;</pre>
Posted 19-Dec-12 17:55pm
Edited 19-Dec-12 19:58pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Build the Item Template dynamically

Read the text box values and id from java-script and save it hidden fields then navigate to required page

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

  Print Answers RSS
0 OriginalGriff 490
1 Sergey Alexandrovich Kryukov 325
2 ProgramFOX 265
3 Maciej Los 245
4 Andreas Gieriet 200
0 OriginalGriff 465
1 Sergey Alexandrovich Kryukov 275
2 ProgramFOX 265
3 Maciej Los 245
4 Andreas Gieriet 200

Advertise | Privacy | Mobile
Web03 | 2.8.150331.1 | Last Updated 20 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100