If you want to persist this collection, you will have to save it. You can do
this in Cache or in ViewState or even in Session (if it has that long of a
life, which I doubt). You then add the record to the List when you get a
postback and save back to the database, if that is your method. You do not
have to rebind every time, although you can. The best method to follow for
this is to move the binding out of Page_Load and into a routine that can be
called from Page_Load and any postback event.
If this were a windows forms app, you would have all of this done for you,
but the stateless nature of the web means you have to wire things up.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*********************************************
Think outside the box!
*********************************************
"Kuldeep" <ku****************@hotmail.comwrote in message
news:uX**************@TK2MSFTNGP05.phx.gbl...
Framework: Visual Studio 2005, ASP.NET
Programing Language: C#.NET
I am using a Generic List Collection to fetch a particular master data
from the database. Once collected, I use this Collection to bind it to a
DataGrid.
Now that I am using a Generic List Collection to populate the DataGrid,
say another user would insert a new record on to the same master data from
a different machine, the updated data (along with the lastest inserted
record) would not be available in the Generic List Collection!
How do I control this?
Please advise.
Thanks,
Kuldeep