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