ObjectList & OledbReader

C

Craig

Hi,

Here's the scenario

I have a mobile:ObjectList on my page, which I'm binding to an OleDBReader object (which in turn is the result of an Access 2000, Query), and the results display great in my mobile website. All five fields that I have, let's say for argument they're, Name, UID, ParentUID, ImagePath, Price, the all display. They all page okay. Lovely

The problem I have is when I attempt to add a Command to the object list. Now I've correctly setup the CommandName, and function (it displays on the mobile page okay), and once it's clicked I can step through the code to check that my e.CommandName is exactly what I want

The problem is I want to react to the click of that command (which is visible when I've viewed my objectList, then clicked an Item in the list, which then displays a page with all the fields of the clicked item & this commandName), by interrogating the underlying item that was selected. Basically, I want to get at the ImagePath field of the item that was clicked.

But I can't seem to find a way to obtain the field values of the item that's passed to my ItemClick method, (sender and eventArgs)

The example I have found on the MSDN (http://msdn.microsoft.com/library/d...us/mwsdk/html/mwlrfobjectlistcommandclass.asp) uses a custom item (Book), that is added to an ArrayList that the ObjectList is bound to. Then on the click event the e.ListItem.ItemData is cast into a Book, which then allows the code to interrogate the appropriate field

So the question is, is there a way to retrieve field information from an oleDbReader object, or will I have to take the oleDBReader object, process it into a custom object/ArralyList. Bind that to my ObjectList, then in the select, Cast the e.ListItem.ItemData back to the custom object, then access it's properties that way

Thanks in advance

C.
 

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,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top