Combobox
-
Hi, How to fill a combobox with avalue from 20-100 Thankyou YPKI
-
Hi, How to fill a combobox with avalue from 20-100 Thankyou YPKI
-
Hi, How to fill a combobox with avalue from 20-100 Thankyou YPKI
-
Hi, How to fill a combobox with avalue from 20-100 Thankyou YPKI
-
I guess what you need is to Set minValue = 20 and maxValue = 100
Ahsan Ullah Senior Software Engineer MCTS 2.0
-
I guess what you need is to Set minValue = 20 and maxValue = 100
Ahsan Ullah Senior Software Engineer MCTS 2.0
Hi, i don't think u can have min value & max value for a combo box Satish Pai B
-
how about property of it "Datasource" and "Display Memeber" ? what it use for ? how to use ?
Hi, we can set a datatable to datasource.if u want to fill those numbers to combobox we need to loop & then fill datatable & then assign it to combobox.datasource property. Better to use "combobox1.items.add " & a loop . Display member property is used when we have more no.of columns in a query for ex: - <b> SqlCommand cmm = new SqlCommand(); cmm.CommandText = "select Emp_Id,Emp_Name,Emp_Address from Employee"; cmm.CommandType = CommandType.Text; cn.open(); cmm.Connection = cn; DataTable dt = new DataTable(); SqlDataAdapter sqldt = new SqlDataAdapter(cmm); sqldt.Fill(dt); comboBox1.DataSource = dt; comboBox1.DisplayMember = "Emp_Name"; comboBox1.ValueMember = "Emp_Id"; cn.close();</b> While Displaying it Displays employees Name & if u are going to save it in table then we can use "comboBox1.selectedvalue" property were we get the Emp_Id
-
Hi, i don't think u can have min value & max value for a combo box Satish Pai B
i don understand what u mean "min value & max value" ? however i think that in my combo box just store some string values n id. and i want to ask u a bit more... does combo box can store more then 2 colume or fields. for eg: Emp_ID, Emp_Name, Emp_Gender,Emp_Phone.. ?
-
i don understand what u mean "min value & max value" ? however i think that in my combo box just store some string values n id. and i want to ask u a bit more... does combo box can store more then 2 colume or fields. for eg: Emp_ID, Emp_Name, Emp_Gender,Emp_Phone.. ?
No Combo Box can store only 2 columns by 2 Properties 1.DisplayMember - This does the work a displaying a column 2.ValueMember - This does a work what value should be returned when a particular item is choose d. Ex:- EmpID EMP_Name 1 abc 2 def 3 xyz when u select a Emp_name - "def" from combo box & if u use "combobox1.selectedvalue" then it returns 2 or if u select "xyz " then it returns 3 doesn't mind if u still didn't get it.Just reply for doubts.
-
No Combo Box can store only 2 columns by 2 Properties 1.DisplayMember - This does the work a displaying a column 2.ValueMember - This does a work what value should be returned when a particular item is choose d. Ex:- EmpID EMP_Name 1 abc 2 def 3 xyz when u select a Emp_name - "def" from combo box & if u use "combobox1.selectedvalue" then it returns 2 or if u select "xyz " then it returns 3 doesn't mind if u still didn't get it.Just reply for doubts.
-
No Not possible.