GridView and ArrayList of Objects

G

Guest

I have a simple requirement to bind a small ArrayList of (ItemLine) Objects
to a GridView control. The Gridview renders on the page and allows me to
click update/edit buttons...however the data does not change, and in the
updated and updating row events the newValues collections are empty!!!

I've tried various other methods such as using an ObjectDataSource, but my
ArrayList does not existing in a database until after the editing and
updating in the gridview is complete and the form completes. Also how can we
control or preinitialise the ObjectDataSource with a subset of data... anyway
I'd prefer to use the ArrayList of Objects (my ItemLine objects).

Am I attempting to do the impossible? Each ItemLine object has a property
ItemLn which is the sequential primary key; also an ItemDate, Desc and an
Amount.

I am lost!!
 
G

Guest

Yeah thats great but its still taking its data from a single source for all
GridView controls that use the objectdatasource specified. Sorry I omitted
the main requirement to have the application preinitialise the 'datasource'
for each GridView... it similar to providing an array of data and nallow the
user to work on that data. I'm trying to use the GridView as a means of
collecting a set of item data from the user...for example invoice detail
lines.
 
G

Guest

Update: I can get the data in the array to change If I manually code in the
changes. What I can't seem to get working is collecting the new data values.
I've tried accessing e.NewValues but it always seems to be empty!!!

help!
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top