|
-
May 23rd, 2009, 07:30 PM
#1
Thread Starter
Member
Items are many datarows.
I have a combobox. And i have a datagridview.
i want when click combobox it drops datarows of datagridview down.
How can i do that ! thanks
Last edited by Nguyendangtruong; May 23rd, 2009 at 07:33 PM.
-
May 23rd, 2009, 07:52 PM
#2
Re: Items are many datarows.
you want a dropdown datagridview?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
May 23rd, 2009, 07:57 PM
#3
Re: Items are many datarows.
I assume that you mean that you want the values from one of the columns in the grid to be displayed in the ComboBox. Assuming that your data is bound, you can simply bind the same data to both the grid and the ComboBox. The specify which column to display in the ComboBox using the DisplayMember property:
vb.net Code:
Me.BindingSource1.DataSource = myList Me.DataGridView1.DataSource = Me.BindingSource1 Me.ComboBox1.DisplayMember = "SomeColumn" Me.ComboBox1.DataSource = Me.BindingSource1
In that case 'myList' might be a DataTable or any other list you care to bind. "SomeColumn" can be the name of a DataColumn or the name of a property of the items in the list.
-
May 23rd, 2009, 08:03 PM
#4
Thread Starter
Member
Re: Items are many datarows.
Thanks Jm. But i am sorry. i mean i need all rows in datagridview or another dataset will drop down when i click combox.
It means not a column as you mention , i want all columns.
i am sure it is possible. because i saw that. but i dont know
thanks.
-
May 23rd, 2009, 08:06 PM
#5
Re: Items are many datarows.
It is possible, but you would either have to buy it, or make it. If you want to buy it I think ComponentOne had a similar control.
-
May 23rd, 2009, 08:16 PM
#6
Re: Items are many datarows.
If you search for multicolumn combobox you will almost certainly find some results. It's been mentioned on this forum many times before. You might also try The Code Project as I'm sure there's at least one example there.
-
May 23rd, 2009, 08:21 PM
#7
Thread Starter
Member
Re: Items are many datarows.
Thanks JM.
It is thing which i need.
-
May 23rd, 2009, 08:29 PM
#8
Thread Starter
Member
Re: Items are many datarows.
Is that autocomplete combobox ?
Last edited by Nguyendangtruong; May 23rd, 2009 at 08:37 PM.
-
May 23rd, 2009, 08:46 PM
#9
Re: Items are many datarows.
 Originally Posted by Nguyendangtruong
Is that autocomplete combobox ?
Did you read about that control? Did that information give any indication of what the control is for? Did it give any indication that it was for displaying multiple columns?
-
May 23rd, 2009, 09:01 PM
#10
Fanatic Member
Re: Items are many datarows.
Hi Nguyendangtruong.
Thanks for this subject. i need it too.
Last edited by manhit45; May 23rd, 2009 at 09:05 PM.
-
May 23rd, 2009, 09:04 PM
#11
Thread Starter
Member
Re: Items are many datarows.
Thanks Jm.
i dont want to say this. but actually you are very wonderful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|