DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006

    Multiple SelectedValue From DataKeyNames???

    I have a multiple DataKeyNames from a gridview that need to be set up on a detailview DataSource as SelectParameters. I tried the following code, but both parameter return the same value which is the first one:

    <asp:ObjectDataSource ID="ods" Runat="server" TypeName="Test" SelectMethod="GetTestData">
    <asp:ControlParameter ControlID="gvw" Name="id_data" PropertyName="SelectedValue" Type="Int32" />
    <asp:ControlParameter ControlID="gvw" Name="cde_data" PropertyName="SelectedValue" Type="String" />

  2. #2
    Join Date
    Apr 2008
    <asp:ControlParameter ControlID="gvw" Name="Item_ID" PropertyName="SelectedDataKey.Values[id_data]" Type="Int32" />
    <asp:ControlParameter ControlID="gvw" Name="Item_ID" PropertyName="SelectedDataKey.Values[cde_data]" Type="String" />

    should work. [:

Similar Threads

  1. Multiple table problem
    By kenn_rosie in forum .NET
    Replies: 0
    Last Post: 01-14-2006, 03:44 AM
  2. Replies: 4
    Last Post: 11-28-2005, 02:14 PM
  3. Router with Multiple IPs
    By Brian H in forum Web
    Replies: 0
    Last Post: 01-17-2002, 01:42 PM
  4. Oracle and multiple recordsets
    By JeanH in forum VB Classic
    Replies: 1
    Last Post: 05-31-2001, 11:22 PM
  5. Assign multiple variables in a SP?
    By Shaun Higgins in forum Database
    Replies: 2
    Last Post: 03-02-2001, 09:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.