Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. GridView Problem

GridView Problem

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdatabasesql-server
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sasan56
    wrote on last edited by
    #1

    Hi Dear I use VS2005 (ASP.NET 2) & SQL Server 2005 In a Gridview i have a column that is a foreign key & it's data type is TinyInt. I want to show another data field that is related with master table, like a ComboBox that has 3 parameters (DisplayMember , ValueMember & SelectedValue), but there isn't any SelectedValue paramete in my Gridview ! How can i do that ?

    C S 2 Replies Last reply
    0
    • S sasan56

      Hi Dear I use VS2005 (ASP.NET 2) & SQL Server 2005 In a Gridview i have a column that is a foreign key & it's data type is TinyInt. I want to show another data field that is related with master table, like a ComboBox that has 3 parameters (DisplayMember , ValueMember & SelectedValue), but there isn't any SelectedValue paramete in my Gridview ! How can i do that ?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You have to find the combo box in the row that is selected and then get it's selected value. The combo box, not the grid view row, contains the value.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      1 Reply Last reply
      0
      • S sasan56

        Hi Dear I use VS2005 (ASP.NET 2) & SQL Server 2005 In a Gridview i have a column that is a foreign key & it's data type is TinyInt. I want to show another data field that is related with master table, like a ComboBox that has 3 parameters (DisplayMember , ValueMember & SelectedValue), but there isn't any SelectedValue paramete in my Gridview ! How can i do that ?

        S Offline
        S Offline
        SayreCC
        wrote on last edited by
        #3

        Hi, set your gridview with a datakeys. Datakeys one of the property of your gridview. datakeys = [columnfield from database]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups