This is a migrated thread and some comments may be shown as answers.

items.add for ComboBox

5 Answers 198 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 14 Jan 2013, 11:04 PM
I'm not able to find a working example of what I need. They are either outdated and not compatible with 2012 Q3 or they don't apply.

I need the Telerik version of
Dim GuestCB As DataGridViewComboBoxCell
GuestCB = DataGridView1.Rows(DataGridView1.RowCount - 1).Cells("Guests")
                For Each RV2 As DataRowView In DV2
                    Dim Row2 As DataRow = RV2.Row
                    GuestCB.Items.Add(DVGuests.Table.Rows(DVGuests.Find(Row2(2)))("LookupName"))
                Next

DV2 is a filtered DataView that changes with each row, that's why I fill the ComboBox manually. This is just for display purposes - nothing is selected.

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Jan 2013, 02:52 PM
Hi Jeff,

Thank you for writing.

Please refer to the following documentation article which explains how you can work with GridViewComboBoxColumn and how you can populate it with data: http://www.telerik.com/help/winforms/gridview-columns-gridviewcomboboxcolumn.html .

I hope that you find this information useful.

Regards,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Jeff
Top achievements
Rank 1
answered on 17 Jan 2013, 05:58 PM
I don't see how do accomplish what I need. I can't bind the column because each row will present different options in the combobox. The combobox will show a list of Guests that are attending the appointment specified in the row. 
Row 1 might show
Bob
Angela
Samuel

and Row 2 might show
Sarah
Steven
Rachel

Is my only option to filter the data each time someone clicks the combobox? I want to be able to show the first guest in the combobox.text.
0
Stefan
Telerik team
answered on 21 Jan 2013, 09:21 AM
Hi Jeff,

Please take a look at this Knowledge Base article, which demonstrates how to achieve the desired functionality: http://www.telerik.com/support/kb/winforms/gridview/cascading-comboboxes-in-radgridview.aspx.

I hope you find it useful.

Regards,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Jeff
Top achievements
Rank 1
answered on 13 Feb 2013, 07:17 PM
Stefan,

thank you for the reply. Each row will have one or more guests and many rows may share one or more guests. Because of this each row must be assumed to use a unique list of guests. This method seems to require that I create a new list for every row. If I have 5000 rows then I will have 5000 lists. Is this true?

Thank you,
Jeff
0
Stefan
Telerik team
answered on 18 Feb 2013, 01:08 PM
Hello Jeff,

The approach requires you to bind the column to all possible values you need to display in its cells and then, bind each editor to a subset of these values, so if you need unique list of guests per row and you have 5000 rows, will end up with 5000 lists at some point.

If this does not work for you, feel free to check if our hierarchical grid functionality might suit your needs: http://www.telerik.com/help/winforms/gridview-hierarchical-grid-binding-to-hierarchical-data.html. Example of hierarchical grid are available in our Demo application > Hierarchy.

I hope that you find this information useful.

All the best,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
GridView
Asked by
Jeff
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or