Hi Folks
OK so a few weeks ago I asked about showing several grids on a form, and you folks gave me a great solution (Place them in a panel) which worked great - thank you. As it turns out there were more controls than just the grids to display repetitively (labels, text boxes, bottons) that went with each grid, so I floated the idea of creating a UserControl with a grid and the other necessary objects for each system that requires reporting on, that way they could have a solution that would be flexible for other clients as well, and not be limited to just four grids, plus they could close or open any system they wanted to see or not see. Well, they loved that!
So I'm in the process of building out the 'generic' UserControl, and I'm wondering if can I expose the grid datasource on the UserControl as Public and assign it to a dataset / table in the main form? Will that work? If it matters at all these are TrueDBGrid controls and not the standard MS grid control.
Also I found that the current way the application works is that there is a 'dummy' grid control placeholder on the form that is swapped out at runtime by a customized grid control. The customized control is defined as a class in the application. Would it be possible for me to assign the customized grid into the UserControl at runtime from the parent form, and how can I expose that functionality to allow it to happen?
Thanks for any help you can offer. I'm trying to answer this myself via the web but so far I'm not finding an explanation that addresses what I'm looking for specifically.
OK so a few weeks ago I asked about showing several grids on a form, and you folks gave me a great solution (Place them in a panel) which worked great - thank you. As it turns out there were more controls than just the grids to display repetitively (labels, text boxes, bottons) that went with each grid, so I floated the idea of creating a UserControl with a grid and the other necessary objects for each system that requires reporting on, that way they could have a solution that would be flexible for other clients as well, and not be limited to just four grids, plus they could close or open any system they wanted to see or not see. Well, they loved that!
So I'm in the process of building out the 'generic' UserControl, and I'm wondering if can I expose the grid datasource on the UserControl as Public and assign it to a dataset / table in the main form? Will that work? If it matters at all these are TrueDBGrid controls and not the standard MS grid control.
Also I found that the current way the application works is that there is a 'dummy' grid control placeholder on the form that is swapped out at runtime by a customized grid control. The customized control is defined as a class in the application. Would it be possible for me to assign the customized grid into the UserControl at runtime from the parent form, and how can I expose that functionality to allow it to happen?
Thanks for any help you can offer. I'm trying to answer this myself via the web but so far I'm not finding an explanation that addresses what I'm looking for specifically.