A
A
Alexey Zimin2013-12-11 18:55:09
C++ / C#
Alexey Zimin, 2013-12-11 18:55:09

How to bind data table to ComboBox in C#?

Hello! Such a problem: how to bind a data table (consists of lines: No., Full Name, Progress) to a ComboBox collection line. written in the table in the free space in the form. I use Visual Studio 2012. I am
attaching a screenshot of what you need, because maybe someone just won’t understand from the words (I don’t know how to explain, sorry)
7LlfXlF.png?1
I would be glad for a detailed answer! I’m also looking for a mentor.
[C#]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rifat, 2013-12-11
@Alex_Zimin

Of course, I could be wrong, but from the context of the question I realized that we are talking about a group of university students.
If this is the case, then you can organize all this within one table by adding one more column: Group number. Next, make a selection from the table - get a list of all possible groups (SELECT DISTINCT ... ) and add it to the ComboBox (the Add (...) method, as far as I remember). On the SelectedIndexChanged event , make a selection from the same table by adding the condition that the group number is equal to the selected value in the ComboBox and add the result of the selection to the table (GridView).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question