I have a dropdownlistbox in a webform. When the page loads, it displays the initial text, that is ok. When selection is made, it works ok. But when i tried using the text property ie msgbox(cbomodel.text), what shows in the previous text. The newly selected item is never recognized. Is there a way to bind the text to the listbox after a selection is made?

Member Avatar
Member Avatar
+0 forum 1

Okay so I have a datagrid view I am trying to build (here is the code so far) [CODE] public partial class employeeAlterForm4 : Form { static readInFileDel2 readInFileCall = new readInFileDel2(readInFileClass2.readInFile2); static Employee [] employeeTempArray; ToolTip tooltip1 = new ToolTip(); Panel panel1 = new Panel(); //-------------------------------------------------------------------------------------- public employeeAlterForm4() { InitializeComponent(); readInFile(); bool supHold = false; employeeShiftType [] shiftType = new employeeShiftType [1]; DataGridViewComboBoxCell shiftComboBox = new DataGridViewComboBoxCell(); dataGridView1.ColumnCount = 4; dataGridView1.Columns [0].Name = "Employee Name"; dataGridView1.Columns [1].Name = "Age *"; dataGridView1.Columns [2].Name = "Position"; dataGridView1.Columns [3].Name = "Shift Types"; for (int i = 0; i < employeeTempArray.Length - 1; …

Member Avatar
Member Avatar
+0 forum 4

hi there, in my project i have a combo box with some values in it at runtime the user can write on that combo box,ho do i avoid this and let the user select only a value from the combo box. can some one help me with this, thanx

Member Avatar
Member Avatar
+0 forum 2

I have two comboboxes the first one is for order #, the second one is for the amount of order payments, there could be 1, 2, 3... payments for this order. I would like to get all payments to show in the second combobox that relate to the order # selected in the first, process that payment by changing other values in other textbox's. Then have that payment psoted as processed back to the DB table. I have a binding satament, but it pulls all payments, and not just per order. How can I get this to select just by …

Member Avatar
Member Avatar
+0 forum 2

I am working in windows forms in c#. I have at table in sql server which has a column named AssignedTo. This column is of varchar type and contains more than one value separated by commas. When showing in datagrid, the values are shown easily in a cell. But as there are more than one value in AssignedTo column, so I want to show them in combobox in datagrid. The combobox in each row will have different values which have to picked from database. I am trying to write the code in cell formatting event. Please help me and give …

Member Avatar
Member Avatar
+0 forum 1

Hello everyone, Now this is my first time posting a question, if I do end up making it too general please let me know. OK, now, I am in the process of programming a small program capable of accessing a sql database. That is no problem. Now, I have decided to look into the use of the combo box tool to avoid having different text boxes for the user to type in what he/she wishes to search for (for example, First name, last name, by nationality, etc) Now, the current method I am using is to set up an if …

Member Avatar
Member Avatar
+0 forum 4

Here is the thing. This code segment is supposed to add the Subject Codes for Student each time I change the Student ID from [I]jcmbDIT [/I]combo box. Initialization works well. and after I handled [I]NullPointerException[/I] subject codes are loaded into the [I]jcmbSubCode[/I] combo box correctly. [CODE]private void jcmbDITActionPerformed(java.awt.event.ActionEvent evt) { DA da = new DA(); //DA is the class for accessing database (Hibernate) Vector sub = da.listStudentSubjects(jcmbDIT.getSelectedItem().toString()); //Get the enrolled subjects into a Vector try { //Get the data model used by jcmbSubCode , cast it to default model for combo boxes DefaultComboBoxModel dcbm = (DefaultComboBoxModel) jcmbSubCode.getModel(); dcbm.removeAllElements(); //remove all …

Member Avatar
+0 forum 0

Hi php masters.. i manage to use an ajax combobox to shows bus fares and destination on my site and it works great in xampp.. problem start when i tried to upload the site to my host server (linux).. the combobox contains 4 .php scripts and 1 .js script there are 3 tables in the mysql database; origin (asal), destination (tujuan) and price (harga). i already googling to solve my problem but still no result.. :( thanks for you help.... :D so here goes.. ajax.js [CODE=syntax] var xmlHttp = buatObjekXmlHttp(); function buatObjekXmlHttp() { var obj = null; if (window.ActiveXObject) obj …

Member Avatar
+0 forum 0

I have a dataGridView with 4 columns. 3 of the columns i want to use a combobox. In the datagridview properties from the design view i already set the columns to DataGridViewComboBoxColumns. how do i from the code set the columns values from a dataset? I can get the data i need in two datasets just don't know how to tie the data from my dataset to the related columns. Here is what i have so far. I keep getting a error when the grid loads: "DatqaGridView Default Error Dialog. The following exception occurred in the DataGridView: System.ArgumentException:DataGridViewComboBoxCell value is …

Member Avatar
Member Avatar
+0 forum 8

Hi All! I have a table that there is a combo box inside the table. For example, the combo box consist of item codes. And then, whenever user choose item from combo box, the next column inside the table will show name of the item. Here is my example coding: [CODE] sql = "SELECT desc_bar FROM inv_item WHERE kode_bar = '" + cboBarang.getSelectedItem().toString() + "'"; stmt = Koneksi.getConnection().createStatement(); rs = stmt.executeQuery(sql); if (rs.last()){ tabel.setValueAt(rs.getString(1), 0, 1); } else { tabel.setValueAt("", 0, 1); } [/CODE] My question is how if there is many rows in a table. I tried to use …

Member Avatar
Member Avatar
+0 forum 5

Hi all, I'm new to Java and going through a steep learning curve. Every now and then I'm getting dead stuck, so your help is immensely appreciated. So, here's the problem: (with Java NetBeans IDE) I have a JFrame form, and in it 4 JComboBox'es. Also a JButton titled "Enter". So when I click on the "Enter" button I want to read the selected ComboBox Text for all the ComboBoxes. e.g. if ComboBox 1 = "Ford" ComboBox 2 = "Focus" ComboBox 3 = "Red" ComboBox 4 = "2005" then upon clicking the "Enter" button I would like to have something …

Member Avatar
Member Avatar
+0 forum 6

Hey everyone. I am having problems trying to figure out how the user can select the times they want to start work at, the time they want to have from lunch and finally the time they would like to finish. I then would calculate the number of actual working hours. I also need to ensure the the user does not select a finish time before the start time . Does any one have any idea how I can achieved this. If anyone has any idea how to do any part Please let me know. Thanks James

Member Avatar
Member Avatar
+0 forum 2

hello, i m fresher in php. i m having problem getting following display in "multi level combo box" 1. 1.a 1.a.1 1.a.1.1 1.a.1.2 1.a.1.3 1.b can you please help me how it can be done ? thanks sadiya

Member Avatar
Member Avatar
+0 forum 4

Hi all, For a combobox I was trying to imitate the behaviour of this code example:[url]http://msdn.microsoft.com/en-us/library/system.windows.forms.listcontrol.valuemember.aspx[/url] So I have this class: [CODE=c#]class Planet { private string myName; private double myGravitationalAcceleration; public Planet(string strName, double Acceleration) { this.myName = strName; this.myGravitationalAcceleration = Acceleration; } public string Name { get { return myName; } } public double GravitationalAcceleration { get { return myGravitationalAcceleration; } } }[/CODE] And a form with a combobox on it and this code: [CODE=c#]public partial class InputData : Form { public InputData() { InitializeComponent(); List<Planet> Planets = new List<Planet>(); Planets.Add(new Planet("Earth at equator 0°", 9.78)); Planets.Add(new Planet("Earth at …

Member Avatar
Member Avatar
+0 forum 2

Hi, I'm trying to figure out how to pass parameters across JSP pages without using links. For some reason, I can only get null across... Here is my code: Page 1 [CODE] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Test Page</title> </head> <body> <form name="testForm" action="Test.jsp"> <select name='tableSelect' onChange='testForm.submit();' style="text-align:center"> <option value='--Select Table--'>--Select Table--</option> <option value='CONFIG_SOURCE'>CONFIG_SOURCE</option> <option value='CONFIG_PROCESS'>CONFIG_PROCESS</option> <option value='CONFIG_PROCESS_SOURCE'>CONFIG_PROCESS_SOURCE</option> <option value='CONFIG_SAL_ROUTING'>CONFIG_SAL_ROUTING</option> </select> </form> <% out.println(request.getParameter("tableSelect")); %> </body> </html> [/CODE] Page 2: [CODE] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Test Recieve Page</title> </head> <body> <% out.println(request.getParameter("tableSelect")); %> </body> </html> [/CODE] Thanks, -Ashton

Member Avatar
Member Avatar
+0 forum 4

Hello Everyone. I want to make query with php combo box items. When the user click on the items of combo box, the following table will generate correspondent data. Now i can display data in one table, but i don't know how to use it with combo box. Does there anyone can help me out???? Thanks a lot in advance!! :)

Member Avatar
Member Avatar
+0 forum 3

hey hey... just want to know, if theres some kind of way to prohibit the user from entering data into a combobox... i dont want to use a list box... to must space taken, and no point in disabling it... as then i cant select an item... please help thanx in advanced

Member Avatar
Member Avatar
+0 forum 4

The End.