Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Session object as a datasource for Datagrid

Reply
Thread Tools

Session object as a datasource for Datagrid

 
 
Atif Jalal
Guest
Posts: n/a
 
      08-13-2003
Is it possible to have a session object as a datasource for datagrid
control. AS I will be adding rows dynamically. So if I store it in
session on the fly and update the datagrid, will that work? The
session will store an object with many data members, which can be the
columns for datagrid. I don't want to store in database as, untill the
user hit the save button, the new row to be added to the datagrid is
not supposed to be added to database. As user may delete the new row
added to datagrid, before saving the data to database.

Help appreciated.
 
Reply With Quote
 
 
 
 
Naveen K Kohli
Guest
Posts: n/a
 
      08-13-2003
Yep.. it works like a champ. Only thing will be that on post backs you will
have to do the right type casting.

myGrid.DataSource = (DataSet)Session["hereismydata"];

--
Naveen K Kohli
http://www.netomatix.com
"Atif Jalal" <> wrote in message
news: om...
> Is it possible to have a session object as a datasource for datagrid
> control. AS I will be adding rows dynamically. So if I store it in
> session on the fly and update the datagrid, will that work? The
> session will store an object with many data members, which can be the
> columns for datagrid. I don't want to store in database as, untill the
> user hit the save button, the new row to be added to the datagrid is
> not supposed to be added to database. As user may delete the new row
> added to datagrid, before saving the data to database.
>
> Help appreciated.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdownlist in Formview with datasource - setting selected value from session variable Jason ASP .Net Web Controls 0 10-24-2006 01:29 AM
Stored Session object is mixed up with another user's session object. momo898 ASP .Net 2 10-12-2006 03:33 PM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
DataGrid ItemStyle is a textbox and doesn't update the datagrid datasource matthew schouppe ASP .Net Datagrid Control 3 04-30-2004 03:02 PM
DataGrid ItemStyle is a textbox and doesn't update the datagrid datasource matthew schouppe ASP .Net 3 04-30-2004 03:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57