The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

galmos (1) [Avatar] Offline
Hi, i would like to create a DataGridView with a list of Client entities. This Client entity has an IdState foreign key to a related table with the list of states (IdState, Description colums).

I have successfully created a DataGridView with a ComboBox showing state description instead of Id. But as I would like the DataGridView to be read-only, showing a combobox makes the user think he can edit the cell. So to avoid this user behaviour, I would like to have a textbox where the state description would appear.

My problem is that I can't find a way to assign the textbox the value of the state description.

Making an anonymous type with linq solves the problem when viewing data. But I would like to allow databinding to refresh data from an external detail form.

Is there any way to do this?

Thank you