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. Windows Forms
  4. Different Grid Limits

Different Grid Limits

Scheduled Pinned Locked Moved Windows Forms
cssdata-structuresquestion
8 Posts 4 Posters 51 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
    michaelbarb
    wrote on last edited by
    #1

    Working with a DataGridView and a custom control: Is it at all possible for an array to be a parameter in a custom control? The high and low limits for every cell in the grid may be different. It would be nice to have this 3 dimensional array to be part of the parameters. I have read articles that say that it is not possible to have any array to be a parameter in a control. They suggest forgetting DataGridView and doing something like an array of textbox. The grids in the app are always a fixed size and never use scroll bars.

    So many years of programming I have forgotten more languages than I know.

    M L J 3 Replies Last reply
    0
    • M michaelbarb

      Working with a DataGridView and a custom control: Is it at all possible for an array to be a parameter in a custom control? The high and low limits for every cell in the grid may be different. It would be nice to have this 3 dimensional array to be part of the parameters. I have read articles that say that it is not possible to have any array to be a parameter in a control. They suggest forgetting DataGridView and doing something like an array of textbox. The grids in the app are always a fixed size and never use scroll bars.

      So many years of programming I have forgotten more languages than I know.

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      michaelbarb wrote:

      have read articles that say that it is not possible

      In which case move the validation from the constructor to the events, trap the key up or leave event of each cell and validate the content in the event.

      Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

      M 1 Reply Last reply
      0
      • M michaelbarb

        Working with a DataGridView and a custom control: Is it at all possible for an array to be a parameter in a custom control? The high and low limits for every cell in the grid may be different. It would be nice to have this 3 dimensional array to be part of the parameters. I have read articles that say that it is not possible to have any array to be a parameter in a control. They suggest forgetting DataGridView and doing something like an array of textbox. The grids in the app are always a fixed size and never use scroll bars.

        So many years of programming I have forgotten more languages than I know.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        michaelbarb wrote:

        it is not possible to have any array to be a parameter in a control.

        That is a very broad statement, and it would depend entirely in what the control is doing and what information it needs to process.

        M 1 Reply Last reply
        0
        • L Lost User

          michaelbarb wrote:

          it is not possible to have any array to be a parameter in a control.

          That is a very broad statement, and it would depend entirely in what the control is doing and what information it needs to process.

          M Offline
          M Offline
          michaelbarb
          wrote on last edited by
          #4

          I realize it is a broad statement but it is mostly a quote. I am trying to pass a large array of limits into a derived control of DataGridView.

          So many years of programming I have forgotten more languages than I know.

          L 1 Reply Last reply
          0
          • M Mycroft Holmes

            michaelbarb wrote:

            have read articles that say that it is not possible

            In which case move the validation from the constructor to the events, trap the key up or leave event of each cell and validate the content in the event.

            Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

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

            I have done this for a set of limits that apply to all cells. I even got it work on a per column basis by make a lot of separate parameters. I need every cell to have different limits. Trying to pass a large array of limits into a derived control of DataGridView is the problem.

            So many years of programming I have forgotten more languages than I know.

            1 Reply Last reply
            0
            • M michaelbarb

              I realize it is a broad statement but it is mostly a quote. I am trying to pass a large array of limits into a derived control of DataGridView.

              So many years of programming I have forgotten more languages than I know.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Sorry, but we cannot guess what your code is or is not doing, either right or wrong.

              M 1 Reply Last reply
              0
              • L Lost User

                Sorry, but we cannot guess what your code is or is not doing, either right or wrong.

                M Offline
                M Offline
                michaelbarb
                wrote on last edited by
                #7

                I had wanted to make the limit array a control property. I found another way. I made a separate array loaded the array into additional cells in the DataGridView and then made the extra rows invisible.

                So many years of programming I have forgotten more languages than I know.

                1 Reply Last reply
                0
                • M michaelbarb

                  Working with a DataGridView and a custom control: Is it at all possible for an array to be a parameter in a custom control? The high and low limits for every cell in the grid may be different. It would be nice to have this 3 dimensional array to be part of the parameters. I have read articles that say that it is not possible to have any array to be a parameter in a control. They suggest forgetting DataGridView and doing something like an array of textbox. The grids in the app are always a fixed size and never use scroll bars.

                  So many years of programming I have forgotten more languages than I know.

                  J Offline
                  J Offline
                  jsc42
                  wrote on last edited by
                  #8

                  You could use the Tag property, it can hold any Object.

                  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