DataKeyField Property in Datagrid

Discussion in 'ASP .Net Web Controls' started by Bruce LeMond, Nov 17, 2003.

  1. Bruce LeMond

    Bruce LeMond Guest

    The datakeyfield property in the datagrid just lets us
    specify one field. But my primary key consist of 3
    fields. I know that this is used as a parameter for the
    execution of the findby method to find the record in the
    dataset for updating. So I went into the code and put in
    the parameters in the findby method which would be as
    follow:

    Dim r As DSHousekeepitems.housekeepingItemsRow
    r =
    DSHousekeepitems1.housekeepingItems.FindByroomitemRequestDa
    te(UPTRoom, UPTItem, UPTRequestDate)

    But no row was found causing an error message being
    displayed when executing. I also put in the code to
    display the values of the three fields, and the values are
    in these fields ok. So anyone have any answers on why the
    record is still not being found?

    Thanks in advance.
     
    Bruce LeMond, Nov 17, 2003
    #1
    1. Advertisements

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. sramruttun
    Replies:
    0
    Views:
    420
    sramruttun
    Jul 10, 2003
  2. Homer J. Simpson
    Replies:
    2
    Views:
    1,258
    Suresh
    Mar 5, 2004
  3. Adam Knight

    DataGrid - DataKeyField!!

    Adam Knight, Aug 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    4,509
    Adam Knight
    Aug 7, 2005
  4. Sean

    how to get datagrid item index from DataKeyField value?

    Sean, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    1,493
    Arthur
    Aug 7, 2003
  5. A. Atienza

    DataGrid's DataKeyField Value (C#)

    A. Atienza, Dec 7, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    483
    Michael Tkachev
    Dec 7, 2004
  6. Stephen Woolhead

    Datagrid DataKeyField and Webservice Proxy Objects

    Stephen Woolhead, Dec 16, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    338
    Stephen Woolhead
    Dec 20, 2004
  7. Kylin

    How to get the DataKeyField in the DataGrid ?

    Kylin, May 31, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    601
    Brock Allen
    May 31, 2005
  8. Bruce LeMond

    DataKeyField Property in Datagrid

    Bruce LeMond, Oct 28, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    208
    Bruce LeMond
    Oct 28, 2003
Loading...