R
Rich P
I want to create a continous form in my C# (VS2008) application -- the
same as a continous form in MS Access. The purpose is purely for
exercise. Here is the scenario:
Say I have a table with 50 rows. I want to display the data from each
row in textboxes on a form. Ideally, I could have a simple form with
the desired textboxes and a prev/next button setup to display the data
in each row. But instead I want a continous form, and I am thinking
like having a panel for each row where each panel would contain the
desired textboxes for each row. And these panels would be contained
within a larger panel (the parent panel) which would have a vertical
(and horizontal) scroll bar so I can scroll up and down the form to view
each row (each panel).
A question follows, but Here is what I am currently thinking to achieve
my continuous form: suppose the underlying table contains 30 rows of
data. So in the form (call it formA) I dynamically create 30 panels
with the desired textboxes (I dynamically add textbox controls to each
panel and add each panel control to the Parent Panel) and populate
everything. Then, if I refresh the data and say now there are 50 rows
-- I dynamically re-Add 50 panels and so on. Say Panel1 is the parent
and I add controls to it (the panels containing the textboxes for each
row). My question is if this is the approach I want to take? If this
is not the ideal approach -- could someone suggest how I should do this?
Thanks
Rich
same as a continous form in MS Access. The purpose is purely for
exercise. Here is the scenario:
Say I have a table with 50 rows. I want to display the data from each
row in textboxes on a form. Ideally, I could have a simple form with
the desired textboxes and a prev/next button setup to display the data
in each row. But instead I want a continous form, and I am thinking
like having a panel for each row where each panel would contain the
desired textboxes for each row. And these panels would be contained
within a larger panel (the parent panel) which would have a vertical
(and horizontal) scroll bar so I can scroll up and down the form to view
each row (each panel).
A question follows, but Here is what I am currently thinking to achieve
my continuous form: suppose the underlying table contains 30 rows of
data. So in the form (call it formA) I dynamically create 30 panels
with the desired textboxes (I dynamically add textbox controls to each
panel and add each panel control to the Parent Panel) and populate
everything. Then, if I refresh the data and say now there are 50 rows
-- I dynamically re-Add 50 panels and so on. Say Panel1 is the parent
and I add controls to it (the panels containing the textboxes for each
row). My question is if this is the approach I want to take? If this
is not the ideal approach -- could someone suggest how I should do this?
Thanks
Rich