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="SqlDataSourc e1"
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><ItemTe mplate>
<asp:Image ID="Image1" runat="server" ImageUrl="images/tabs/conf igurator/a ddItems.jp g" /></ItemTemplate></asp:Tem plateField >
</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>
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="SqlDataSourc
GridLines="None" EmptyDataText="No options available">
<RowStyle BackColor="White" ForeColor="Black" />
<Columns>
<asp:BoundField DataField="itemdescription
ReadOnly="True" />
<asp:BoundField DataField="price" DataFormatString="{0:c}" HeaderText="Price"
HtmlEncode="False" ReadOnly="True" SortExpression="price" />
<asp:TemplateField><ItemTe
<asp:Image ID="Image1" runat="server" ImageUrl="images/tabs/conf
</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>
You can opt to use a Datacache object and save that information in it and give it a name that is user specific
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.
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?
ASKER
vb.net
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.