I have currently implemented a drop-down which displays all the products name from database. On selection of product name from drop down my edit product form will get populated and user can update selected record successfully.
Now my problem is that i have 5000 products in my database.In this case its very difficult for end user to select particular product in drop-down and also populating drop down with large number of records server side takes more time.
What approach should i use to make selection user friendly.Any ideas or help is greatly appreciated
Thanks!!!!
You should use an editable combo box with auto complete feature and load the data depending on user input. Refer this: http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/ComboBox/ComboBox.aspx
This way you dont need to worry about the amount of data, it gets filtered as the user inputs some string.
Related
I am new in asp.net so may be this is the foolish question I am going to ask but I am suffering from it. I am making a application in which firstly user fill all the details such as country state and city when submit the application it shows preview. The problem comes when in Edit operation all other data is retrieved along with all elements drop down list shows only the retrieved value ...I want to show the retrieved value as selected with the others value as well in the list... because if user wants to change his/her selected value then how will he/ she change the value...
I am using drop-down list.items.add to show the retrieved value from the database ...
I'm trying to create a simple project, an Inventory management system.
We have a set of items for sale in our inventory (defined in the database) and we dispatch items in the quantity that the customer order.
The issue I have is, a user may order just 1 item, or they may order a 100 items, in whatever quantities they prefer (assume the user of this system gets this info through an email).
So I have some trouble creating the "Sales Order" GUI.
I tried using a ListBox / ListView. There I can select all the items they want and generate a sales order, but I can't enter the corresponding quantity.
It is not practical to have like 20 text boxes in the form.
If I understand your question correctly, it seems as if a good approach would be to have a means of selecting the specific product you want to quantify first. Supermarket POS systems do this through PLU (Price Look Up) codes that identify the product name and price. You could alternately have a search box that combs through your database for product names matching the search query.
After that you can have one text box (I would recommend a number spinner) to select the quantity.
Finally have a button that submits that order of that specific product and move on to the next. You could wait to submit all the quantities needed until the order is completed to signify that it is one unique order if that information is important to you.
For one of my projects I need to allow the user to select some products out of a table.
This table will be paged (+2k records in DB).
So the user needs to be able to select items on different pages without losing them.
I was thinking about using 2 tables. One table to select items from and another table(also with paging) where the selected items will be displayed.
But I have no idea how to persist the selected items without using Sessions...
If anybody has a better idea please share it.
Edit:
It is possible(won't happen that much) to select all products (+2k records).
I don't know how mvc will behave if you have 2k hidden fields.
Also lets say i use hidden fields and have the following in my viewmodel
public List<int> SelectedIds {get;set;}
I can then use hidden fields with "SelectedIds[i]" as name(replacing i by an integer).
But the user can also deselect the items again.
And I don't think the binding will work when you skip numbers.
ex: 2 hidden field with these names "SelectedIds[0]" && "SelectedIds[2]"
This is something I'll have to test when i am home...
I am creating a staff rota system in visual studio and would like to populate some textboxes with the staff names from a database to ensure the user does not miss any staff for the rota. Obviously staff will come and go therefore the number of textboxes may need to change.
For instance one week there may be 5 staff members to enter into the rota, but if a staff member leaves the company then the number of textboxes will have to automatically change and be populated with the names from the table after the staff member is deleted from the database.
For the end result I plan on having a list of textboxes populated with the names of existing staff members from the table. This will then allow the user to select their shift times and lunch hours etc.
Any advice or recommendations would be greatly appreciated.
Instead of textboxes...
Use Radio buttons if ONLY one can be selected from the list
Use Checkboxes if MORE than one can be selected from the list
Only use a textbox if you wish to EDIT the names (data)
#Thousand Thanks for the suggestion of using asp.net repeater control.
I did not wish to edit the information I was extracting so I have created a template which extracts the data into labels. Thank you and apologies as this question is in the negative.
I think it would be easier for you to understand my problem if I explain the scenario a bit.
What I am doing is developing a system to a doctor using asp.net c#. For the creation of the prescription, I add a check box list for the list of medicines and submit button below it. When the submit button clicked selected check box list items added to the sql server database and show a data grid with the selected medicines in the same page.
In the data grid there are two columns for medicine name and dosage.Medicine name is taken from the database.I need to give the user the ability to enter the dosage through that grid view. I need to use update command because the record is already there in the sql server.But empty value in the dosage column.I tried to use update command in the data source control. But I can't figure out how to give the WHERE clause because I can't specify the database row which the updating record relate to.
I would be glad to hear some help from you. All the comments are welcome.
You need to set a parameter(s), please check this example to understand how it works. I guess, that you've added in the database some column that is unique identifier.. some autoincrement int or guid.