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. DataColumn and DataTable

DataColumn and DataTable

Scheduled Pinned Locked Moved C#
question
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.
  • 1 Offline
    1 Offline
    123456uio
    wrote on last edited by
    #1

    Hello I´m working with DataTAble and DataColumns. I would like to know how can i put the size of a column THat is, now all the columns has the same size in the tables and i would like to know how can i create of differente sizes.

    I P 2 Replies Last reply
    0
    • 1 123456uio

      Hello I´m working with DataTAble and DataColumns. I would like to know how can i put the size of a column THat is, now all the columns has the same size in the tables and i would like to know how can i create of differente sizes.

      I Offline
      I Offline
      Ioan Anton
      wrote on last edited by
      #2

      You can use the MaxLength property of the DataColumn object (for text columns only)

      1 Reply Last reply
      0
      • 1 123456uio

        Hello I´m working with DataTAble and DataColumns. I would like to know how can i put the size of a column THat is, now all the columns has the same size in the tables and i would like to know how can i create of differente sizes.

        P Offline
        P Offline
        Private_Void
        wrote on last edited by
        #3

        When you state size I am guessing that you mean string length. That is achieved by... DataSet DS = new DataSet(); //Populate the dataset with tables and columns //You can use column names, insead of index, if you have named them DS.Tables[0].Columns[0].MaxLength = 20;

        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