Multiple SelectedValue From DataKeyNames???


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Multiple SelectedValue From DataKeyNames???

  1. #1
    Join Date
    Jan 2006
    Posts
    29

    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">
    <SelectParameters>
    <asp:ControlParameter ControlID="gvw" Name="id_data" PropertyName="SelectedValue" Type="Int32" />
    <asp:ControlParameter ControlID="gvw" Name="cde_data" PropertyName="SelectedValue" Type="String" />
    </SelectParameters>
    </asp:ObjectDataSource>

  2. #2
    Join Date
    Apr 2008
    Posts
    1
    <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, 04:44 AM
  2. Replies: 4
    Last Post: 11-28-2005, 03:14 PM
  3. Router with Multiple IPs
    By Brian H in forum Web
    Replies: 0
    Last Post: 01-17-2002, 02:42 PM
  4. Oracle and multiple recordsets
    By JeanH in forum VB Classic
    Replies: 1
    Last Post: 06-01-2001, 12:22 AM
  5. Assign multiple variables in a SP?
    By Shaun Higgins in forum Database
    Replies: 2
    Last Post: 03-02-2001, 10: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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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