Link to home
Start Free TrialLog in
Avatar of gianitoo
gianitoo

asked on

insert datagrid row to temp table

i have a grid (see below)  and want to add those items on click event to a temp table.  
it works kinda like a shopping cart.  is there a good way to do this in asp.net 2.0 ???
or should i create a table and store items??

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                    BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px"
                    CellPadding="3" CellSpacing="1" DataSourceID="SqlDataSource1"
                    GridLines="None" EmptyDataText="No options available">
                    <RowStyle BackColor="White" ForeColor="Black" />
                    <Columns>
                        <asp:BoundField DataField="itemdescription" HeaderText="Item"
                            ReadOnly="True"  />
                        <asp:BoundField DataField="price" DataFormatString="{0:c}" HeaderText="Price"
                            HtmlEncode="False" ReadOnly="True" SortExpression="price" />
                            <asp:TemplateField><ItemTemplate>
                                <asp:Image ID="Image1" runat="server" ImageUrl="images/tabs/configurator/addItems.jpg" /></ItemTemplate></asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                    <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#FE8330" Font-Bold="True" ForeColor="#E7E7FF" />
                </asp:GridView>
Avatar of 3abqari
3abqari

You can opt to use a Datacache object and save that information in it and give it a name that is user specific
Avatar of gianitoo

ASKER

can you show me example???
need direction.  
the project i am working on is a configurator.  
once you get a product , you can add options (in this case the grid will have the options)  each option has a price and you will add/delete.  at the end you can generate quote based on all options and after that then i can add all the items into my database because they have been approved.  
Are you using C# or VB.NET?
vb.net
ASKER CERTIFIED SOLUTION
Avatar of 3abqari
3abqari

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial