ObjectList & OledbReader

Discussion in 'ASP .Net Mobile' started by Craig, May 7, 2004.

  1. Craig

    Craig Guest

    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.
    Craig, May 7, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JJ
    Replies:
    0
    Views:
    357
  2. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    ObjectList Data-Binding to a List<MyClass>

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Aug 17, 2007, in forum: ASP .Net
    Replies:
    6
    Views:
    737
    Steven Cheng[MSFT]
    Sep 5, 2007
  3. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    DataBinding & the ObjectList Control (Mobile)

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Sep 4, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    647
    =?Utf-8?B?QWxleCBNYWdoZW4=?=
    Sep 5, 2007
  4. gOODiDEA

    How to add a pic to ObjectList or list control ?

    gOODiDEA, Jul 4, 2003, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    186
    Baccarin
    Jul 6, 2003
  5. leezard

    ObjectList help.

    leezard, Aug 24, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    169
    leezard
    Aug 24, 2003
Loading...

Share This Page