Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
I am rewriting an application of my own that is currently in VBA, using VS2010 & VB.net.

This, I hope is a simple question, that will put me clear on the best way to do something.

Currently I have a Form that has a Button on the left, followed by 3 TextBoxes to the right, these are replicated down the page as Button1 thru 14, TextBox 1, 2 & 3 thru 40, 41 & 42.

When a Button is clicked, the data in the corresponding TextBoxes is used in the following screens & processing, all pretty basic stuff, though I obviously have to keep track of all the numbers.

I can do this in VB.net as well, but I imagine that there is a better way of doing this, using some kind of Container, Table or Grid ... all I am looking for here is a bit of guidance on my best option and, if possible, a pointer to an example of it in use and I can work from there ...

Thanks in advance ...

I forgot to say, there are not a fixed number of Rows here, so I could add or delete rows, that's why the method I currently use isn't the best ...
Posted
Updated 28-Feb-13 4:30am
v2
Comments
BC @ CV 28-Feb-13 10:39am    
Your best bet is to do some Googling. I found this in 5 seconds: http://vb.net-informations.com/datagridview/vb.net_datagridview_button.htm
Gary Heath 28-Feb-13 10:45am    
But you Googled DataGridView ... the whole point of my question is that I don't know which method to use, that's why I ask on sites like this, so that people who DO know can help me !!! I could Google all day log, but it's going to get me nowhere if I don't know what to Google !!!
BC @ CV 28-Feb-13 11:04am    
How about "VB.Net" "Data" "Grid""? If you can't effectively research a topic, particularly one with as much material as data presentation, then you are in the wrong business. A software developer has to know how to research and be resourceful.
Gary Heath 28-Feb-13 11:10am    
How about you go and Troll somebody else, I've got some help from another forum, one without smart-arse idiots giving me pointless answers ...

Shame, this place normally has some helpful people on it ...
bbirajdar 28-Feb-13 11:41am    
This thread is funny.. A helpful person trying to help a person who himself does not know what help he wants....

1 solution

Hard to judge not having a comprehensive design artifact, but some key ideas…

So many buttons is already a bad idea. And you will have extra trouble working with them, forget the users who might go crazy.

You can do something much better. For example, it can be a selection list + one button. The list could be as simple as list box, and the button click even handler should act according to a selected item. This will be clear for users and convenient.

Avoid clutter. You should clearly show that a button is related to some list box by proper visual design. First of all, it should be shown by closeness of controls if a groups of related controls. You also can use panels or group boxes, but remember: no single line or outlining by color without clear purpose!

—SA
 
Share this answer
 
Comments
Gary Heath 28-Feb-13 12:33pm    
Thank you Sergey, but in this case it is not for Users, it's only for me and I want to be able to see the whole layout, because one of the columns is a date and I can see where I stand with each row. It is much like a Menu & it links me to a comprehensive detailed screen for that selection.

It is all colour-coded as well, that is where keeping track of all the TextBox numbers first gave me problems, the main reason I want to avoid it this time around :-) !!!
Sergey Alexandrovich Kryukov 28-Feb-13 12:38pm    
Not true at all. Make all list visible at once. Whatever you do, so many buttons is not an option.
You can have items color-coded, but be very careful with color coding. If it's more then 5, forget it.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900