Answer the question
In order to leave comments, you need to log in
Which component to choose to work with EF model classes?
Hello!
Now I am developing a simple application that should work with the database. The main functionality (CRUD operations) is already ready. Now I want to find a convenient way to output data from the database to the program interface. Tried to use DataGrid and on an example of one table selected DbSet<> of the corresponding class as a source. The advantage of this component is that it allows you to easily change data, add and delete them. But the question is this: for example, there is a one-to-many relationship between two tables T1 and T2 with the corresponding foreign key T2_id, and when adding a new row to the table, you have to manually enter T2_id. So, I would like to know if it is possible somehow to "shove" a ComboBox in the T2_id cells, in which one could choose one option from those available in the T2 table.
Thoughts are now confused and I explained as best I could at the moment) If some points are not clear, I will later try to describe the situation with pictures, as I see it.
Answer the question
In order to leave comments, you need to log in
Basically DataGrid can have any other controls in cells, including ComboBox.
You only need to bind not the entire DataSet, but manually specify which columns to take from it (AutoGenerateColumns="False") and take DataGridComboBoxColumn or DataGridTemplateColumn for the ID column.
telerik has no such components. devexpress is not recommended.
I do not advertise this, but everything is quite easy to set up there)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question