i'm having a gridview which is binded to a dataview, OnPageLoad i'm populating gridview records. and i have a textbox and a button, So now i want to add more Records to GridView but this records should not be get added into DB, they just added to the page and of course the default records which are coming from db stay.
<asp:GridView id="gvItems" runat="server">
<Columns>
<asp:TemplateField HeaderText="Item Code" SortExpression="ItemCode">
<ItemTemplate>
<asp:Label runat="server" ID="lblIItemCode" Text='<%# Bind("ItemCode") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
VB.NET Code:
dvSCart = data.GetSCart(Session("SCartId"), 0, varFilterClause, errorStr)
gvItems.DataSource = dvSCart
gvItems.DataBind()
Basically at first Data From DB comes to page then after that Textbox
data should get appended to the Gridview
but Db should not get updated. i tried to do it by keeping DataView
in ViewState or Session variable
but later i came to know am going in a wrong way and that this won't work since Dataview
can't be Serialized
. i just need an idea or right path to do this, is this possible what am doing? may be i think jQuery will help, i googled for jQuery to do stuff but i failed or maybe i didn't understood since m a newbie to jQuery..
[my alternative option ]: create a temp db table and save it... but i don't want to use this option..