Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Mobile > ObjectList & OledbReader

Thread Tools

ObjectList & OledbReader

Posts: n/a

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 ( 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

Reply With Quote

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
ObjectList Data-Binding to a List<MyClass> =?Utf-8?B?QWxleCBNYWdoZW4=?= ASP .Net 6 09-05-2007 03:12 AM
DataBinding & the ObjectList Control (Mobile) =?Utf-8?B?QWxleCBNYWdoZW4=?= ASP .Net 3 09-05-2007 01:22 AM
Looking for a control similar to mobile ObjectList control JJ ASP .Net 0 10-27-2006 06:54 PM
ObjectList help. leezard ASP .Net Mobile 0 08-24-2003 12:41 PM
How to add a pic to ObjectList or list control ? gOODiDEA ASP .Net Mobile 1 07-06-2003 05:42 PM