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. Datagrid Customization

Datagrid Customization

Scheduled Pinned Locked Moved ASP.NET
questiondata-structures
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.
  • M Offline
    M Offline
    MoeInsairat
    wrote on last edited by
    #1

    Hey guys, how can i have the access to all the cells in the datagrid, is it like the 2 dimensional array ? i know i can reach cell 1 and 2 and so on but wat about the cells behind it.

    Estarta

    P 1 Reply Last reply
    0
    • M MoeInsairat

      Hey guys, how can i have the access to all the cells in the datagrid, is it like the 2 dimensional array ? i know i can reach cell 1 and 2 and so on but wat about the cells behind it.

      Estarta

      P Offline
      P Offline
      Pradipta Basu
      wrote on last edited by
      #2

      you can always count the number of cells in a datagrid. so you can iterate through them.

      Pradipta Basu

      M 1 Reply Last reply
      0
      • P Pradipta Basu

        you can always count the number of cells in a datagrid. so you can iterate through them.

        Pradipta Basu

        M Offline
        M Offline
        MoeInsairat
        wrote on last edited by
        #3

        Thanks for your reply. can u give a small example if u don't mind :)

        Estarta

        P 1 Reply Last reply
        0
        • M MoeInsairat

          Thanks for your reply. can u give a small example if u don't mind :)

          Estarta

          P Offline
          P Offline
          Pradipta Basu
          wrote on last edited by
          #4

          Hope this code will help Let the datagrid be dg. foreach(DataGridItem dgItem in dg.Items) for(int i = 0; i < dg.Columns.Count; i++) { TableCell tc = dgItem.Cells[i]; //do the coding with table cell }

          Pradipta Basu

          M 1 Reply Last reply
          0
          • P Pradipta Basu

            Hope this code will help Let the datagrid be dg. foreach(DataGridItem dgItem in dg.Items) for(int i = 0; i < dg.Columns.Count; i++) { TableCell tc = dgItem.Cells[i]; //do the coding with table cell }

            Pradipta Basu

            M Offline
            M Offline
            MoeInsairat
            wrote on last edited by
            #5

            Thanks alot :)

            Estarta

            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