Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HELP: Edit a DataSet (not DataGrid)

Reply
Thread Tools

HELP: Edit a DataSet (not DataGrid)

 
 
Dhruba Bandopadhyay
Guest
Posts: n/a
 
      05-23-2006
I have a DataGrid which has checkbox columns. The data source is a run-time
created data set that I store in a session so I can rebind it during
postbacks. I don't have a database or xml file, etc.

I am wondering if it's possible to edit a dataset directly? So when I click
on a checkbox it will change the value in the dataset and store it back into
session?

If this is not possible how can I use arrays or vectors to temporary store
my checkbox statuses? I guess it's not possible to have one DataGrid have
more than one datasource...


 
Reply With Quote
 
 
 
 
Kerem OZMAN
Guest
Posts: n/a
 
      05-23-2006
Hi,
Yes it is possible. Suppose you have a dataset named northwindDataSet and
it has one table named Customers in it. Then to change a field on a specific
row (first row for this sample) of Custommers you should write something
like:
northwindDataSet.Tables["Customers"].Rows[0]["CustomerID"] = "ALFZI";

Note that here CustomerID is a field on Customers table. Then you can store
dataset in session state.
"Dhruba Bandopadhyay" <> wrote in message
news:...
>I have a DataGrid which has checkbox columns. The data source is a run-time
>created data set that I store in a session so I can rebind it during
>postbacks. I don't have a database or xml file, etc.
>
> I am wondering if it's possible to edit a dataset directly? So when I
> click on a checkbox it will change the value in the dataset and store it
> back into session?
>
> If this is not possible how can I use arrays or vectors to temporary store
> my checkbox statuses? I guess it's not possible to have one DataGrid have
> more than one datasource...
>
>



 
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
GridView edit validation, edit dropdown list, delete popup confirm =?Utf-8?B?a2Vu?= ASP .Net 1 01-23-2006 12:51 PM
Snapshot restraint - edit, edit, edit Alan Browne Digital Photography 24 05-10-2005 10:15 PM
Snapshot restraint - edit, edit, edit Patrick Digital Photography 0 05-06-2005 10:53 PM
Edit All Function for DataGrid, and Moving the Edit Function in a DataGrid Schultz ASP .Net 3 02-14-2005 04:47 AM
copying value of DDL in a Datagrid "pre-edit command" to value in "post edit command" San Diego Guy ASP .Net 0 08-07-2003 08:59 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