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. How to insert a new column in anywhere of DataSet?

How to insert a new column in anywhere of DataSet?

Scheduled Pinned Locked Moved C#
helptutorialquestion
5 Posts 2 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.
  • B Offline
    B Offline
    bengoan
    wrote on last edited by
    #1

    DataSet allow me to add a new column to the end of DataSet . But , I want to add a new column to the first (or anywhere) of DataSet . How to insert a new column in anywhere of DataSet? Thanks a lots if you help me . imagic

    M 1 Reply Last reply
    0
    • B bengoan

      DataSet allow me to add a new column to the end of DataSet . But , I want to add a new column to the first (or anywhere) of DataSet . How to insert a new column in anywhere of DataSet? Thanks a lots if you help me . imagic

      M Offline
      M Offline
      Maqsood Ahmed
      wrote on last edited by
      #2

      Hello, First of all you can not add column in a DataSet. You can do it in a DataTable. Can you explain why do you want to insert column at a specified index? Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

      B 1 Reply Last reply
      0
      • M Maqsood Ahmed

        Hello, First of all you can not add column in a DataSet. You can do it in a DataTable. Can you explain why do you want to insert column at a specified index? Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

        B Offline
        B Offline
        bengoan
        wrote on last edited by
        #3

        Becase those columns aren't in database . But , I want them appear in DataGrid (in specified position) . Is DataTable allow me to insert a new column in anywhere ? Or you want me to add column sequently ? imagic -- modified at 5:19 Saturday 11th February, 2006

        M 1 Reply Last reply
        0
        • B bengoan

          Becase those columns aren't in database . But , I want them appear in DataGrid (in specified position) . Is DataTable allow me to insert a new column in anywhere ? Or you want me to add column sequently ? imagic -- modified at 5:19 Saturday 11th February, 2006

          M Offline
          M Offline
          Maqsood Ahmed
          wrote on last edited by
          #4

          Hello, You can add columns sequentially. You can use DataGridTableStyles for displaying column in whatever sequence you want. HTH. Cheers. Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

          B 1 Reply Last reply
          0
          • M Maqsood Ahmed

            Hello, You can add columns sequentially. You can use DataGridTableStyles for displaying column in whatever sequence you want. HTH. Cheers. Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

            B Offline
            B Offline
            bengoan
            wrote on last edited by
            #5

            Thanks a lot . I do it successfully . imagic imagic

            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