0

I am new to programming and I have a project to develop of a small shopping mall kind

What I want to know is how to add multiple items since there is only a single Textbox for a single item but when there are multiple items how should it work

1)Is it a correct way for designing application If it is fine enough then 2)Once I click on Add Button to add multiple items how the things should go i.e; Do I need to save the things once the user click on Add button and make the textboxes empty so that the user can enter new item

or

is there any other way please specify.

etaiso
  • 2,736
  • 3
  • 26
  • 38
user3252479
  • 31
  • 1
  • 6

1 Answers1

1

There are several approaches and designs. I would refer your question to UX Stack Exchanges

One way is to have a single TextBox with an "Add" button and to have a ListBox (or other similar container), so user can click the Add button to add items to the ListBox.

Something like this:

enter image description here

So in this case you would only enable the "Add" button if the data is valid, then when user click "Add", you should add the TextBox.Text to ListBox and then clear the TextBox.Text. Clicking "OK" will eventually take the data from the ListBox and do whatever you needs.

Of course there are many other approaches, I think this one is pretty basic and intuitive.

Community
  • 1
  • 1
etaiso
  • 2,736
  • 3
  • 26
  • 38
  • Thx for your response and great answer and is it the way the billing applications in shopping malls and other place works plz reply – user3252479 May 03 '14 at 08:29
  • what if i have 5 different items and each items containing 5 text box for eg:item1:-----pen now pen could have 1)price 2)qty 3)amount 4)item_no 5)item_name so now these became 5 textboxes if i want to add other item eg:item2: bag for this how to deal is this possible using listbox or any other control plz specify and thx for the last answer – user3252479 May 05 '14 at 09:45
  • in that case I would say you can show only the item_no, name or other unique id on the listbox and hold somewhere in your buisness logic the other relevant info for each item. Or you can show them in a `ListView` or `DataGridView`. I can't tell you the exact answer as this is a design question and you need to take in account other things like the usage of this info, etc. – etaiso May 05 '14 at 10:00