I have a datatable that I want to display the first 10 records, then display
the next 10 records, and so forth. I'm storing the dataset in a session
variable because as the user makes changes, they don't want them saved until
they press the save button.
Which means I need to initially load the datatable getting rows 1-10 from
the db and display those. Works fine. When the user goes to the next set, I
need to have the first set somewhere in case they have changed them. Well if
I saved the values back in to the datatable and have pulled all of the
records initially (so I don't go back to the db every page reload) I could
modify them to my hearts content until they press save. But how can I have a
datalist limit the number of rows to display. The way I did it before was to
only load the number of rows I needed into the datatable. But now if I have
everything it will display them all.
I suppose if I had to I could copy the 10 records I need for this page into
a new datatable and then bind that.
Ideally I'd like to be able to do some kind of dataview with a .select that
said something like ('RowID >= 0 and RowID <=9') where RowID is the internal
ID of the row. If I have to, I will add it to the stored proc that is
getting me the data but I'd rather not.
TIA.
Jeffrey.
|