-
[2005] How
I have a department form and an employee profile form, in the employee profile, i want to have a combo box or the same, that would display the different departments inside the department table/form and will automatically update the list when i add or delete 1. Thanks
-
Re: [2005] How
Well, you have total control on your combobox... That is, you can add/remove items at will... So why can't you just add other departments as additional items in your combobox? At run time, when the user type an item that is not available in the list, you can just append it to the list. Now for saving the list, you can use My.Settings or just save the list somehow to harddrive, and reload the combobox at form load using the saved list.
-
Re: [2005] How
i think there is something similar to combobox that is really used for what i want, i want it that the combobox is not editable or text cant be put in it, just plain data that user will select, can anyone help me with the codes? thx alot
-
Re: [2005] How
Well, if you set the combobox to not editable, you're gonna have to provide some way for the user to add/remove items somehow. My suggest is to have a button that call up another form for editing the items. Once the editing is done, save the list and reload your combobox.
-
Re: [2005] How
i think there is a way, to call the department name inside the department table and make them show up in the combobox located at my employee profile form? right? thats what im trying to figure out. thanks
-
Re: [2005] How
Are you talking about windows forms or something else? I don't get it... What is the department table that you're talking about? A datatable? A datagridview? If possible, can you show a screenshot of the 2 forms?
-
2 Attachment(s)
Re: [2005] How
its a windows form, the department forms datatable.
basically, the Department Name in the employeeprofile should be a combobox when clicked should display all the current Department names, in the department form / datatable tyy
-
Re: [2005] How
The EmployeeProfile.jpg image shows just the record description for an employee record... So the data must be coming from some sort of database. Do you already have the database? If you do, you can use ADO.Net to interact with your database... If you don't, I suggest that you should work out your database first before going any further... Why? Because you simply can't writing a front-end program without knowing about the back-end database... At the very least, you should know the table names, field names and their datatypes, any relationship between tables in the database.
-
Re: [2005] How
Yes i have the tables and database ready, MS SQL 05 express is my backend, do u happen to know how to code the combobox in the employeeprofile and display the DepartmentName column located in the departmentlist table? thanks again
-
Re: [2005] How
Do you know how to connect to your database and get the data from it? Do you know how to do insert/update/delete transactions? If you do know these already, all you need to do is read the data from the department list table to a datatable and the bind the datatable to your combobox setting the combobox DisplayMember property to "DepartmentName".