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. General Programming
  3. C#
  4. Can any solve this?????

Can any solve this?????

Scheduled Pinned Locked Moved C#
wcfhelpquestion
4 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.
  • R Offline
    R Offline
    Regardt
    wrote on last edited by
    #1

    I want to connect dataset table (returning dataset form a web services) with a table in a datagrid. The problem is I just want to use a selected amount of columns from the dataset. Any ideas would be appreciated Thanks :)

    N I 3 Replies Last reply
    0
    • R Regardt

      I want to connect dataset table (returning dataset form a web services) with a table in a datagrid. The problem is I just want to use a selected amount of columns from the dataset. Any ideas would be appreciated Thanks :)

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Are you autogenerating the columns in the datagrid? Just so I understand. You are populating the datagrid with one dataset and want to add another dataset (from a webservice)? Have you look at the merge method?

      1 Reply Last reply
      0
      • R Regardt

        I want to connect dataset table (returning dataset form a web services) with a table in a datagrid. The problem is I just want to use a selected amount of columns from the dataset. Any ideas would be appreciated Thanks :)

        I Offline
        I Offline
        Ista
        wrote on last edited by
        #3

        You need to create your to add a table styles object to the tablestyles collection. This will allow you to specify column mappings and so on. Of course you could set the width to 0 and that would also hide them This way is better in that you can create custom columns like check bools combos and what not example: DataGridTableStyle newStyle = new DataGridTableStyle(); newStyle.MappingName = "CCheckInList"; // This is the name of the table newStyle.ColumnHeadersVisible = true; DataGridTextBoxColumn gridColumn = new DataGridTextBoxColumn(); gridColumn.MappingName = "Dispatcher"; // This is the column name gridColumn.NullText = "Must Assign"; gridColumn.HeaderText = "Dispatcher"; gridColumn.Width = 100; newStyle.GridColumnStyles.Add(gridColumn); TableStyles.Clear(); this.TableStyles.Add(newStyle); I'm not an expert yet, but I play one at work. Yeah and here too.

        1 Reply Last reply
        0
        • R Regardt

          I want to connect dataset table (returning dataset form a web services) with a table in a datagrid. The problem is I just want to use a selected amount of columns from the dataset. Any ideas would be appreciated Thanks :)

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          custom table mappings is the answer for a 100 I'm not an expert yet, but I play one at work. Yeah and here too.

          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