How do you make a dataset when you cannot use a database for it?

C

COHENMARVIN

I have a challenge on my job: to make a gridview that depends on a
dataset that is not from a database. The reason for this is that
there are two gridviews plus some other data that have to be saved to
a database all at once.
To simplify a little, at the top of the form, the user enters two
numbers which describe how many rows each grid has to have. (He also
enters some other data). I guess he would click on a submit button
once he has those numbers. Then he has to enter all the data in the
all the rows for the 2 grids. The grid rows should have EDIT and
DELETE buttons.
At the end of all this, he enters a password and clicks on a submit
button. Only after he does all this can I save the grid information
(and the 2 numbers and the other data) to databases.
So it seems to me that I can't have each grid with a datasource of a
database, because it would be showing what it retrieves with its
SELECT statement, which at the start of the data-entry would be no
rows at all.
The original setup I had was that the user would fill out a row of
textboxes and checkboxes, and then he would hit a submit button, and
the data would be added to a database, and the grid would reflect the
new row added. I repeated this method for the 2nd grid. But I was
told that I should have an all-or-nothing operation - either all the
grids and other data are submitted (with a password), or nothing is.
Is there a way to do this?
Thanks,
Marvin
 
C

Cor Ligthert[MVP]

Marvin,

A simple question, do you use a Session to store the dataset between the
sends?

Cor
 
C

COHENMARVIN

Marvin,

A simple question, do you use a Session to store the dataset between the
sends?

Cor
I don't think so. All the grids are on the same page, so there seems
to be no need to do that. But if I'm wrong, let me know.
-- Marvin
 
C

Cor Ligthert[MVP]

You need it,

As you send a page, everything goes totaly out of scope. A page is not
persistend.

Therefore you have to save before you do a send (in fact as all events are
done).

The nicest is for me for that the session item, because the dataset
serializes smootly in that.

You have to reinstall everything again as the page isposted back.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top