There is a BindingList<ActionEnum> , I want to use it as a DataSource in a DataGridView.

ActionEnum is an enumeration

I want to bind to these properties:

 //Сюда хочу присвоить номер элемента перечисления dgvPermitionActions.Columns["Action_id"].DataPropertyName //Сюда хочу присвоить как он называется dgvPermitionActions.Columns["ActionName"].DataPropertyName 

Can I bind it in such a way that I would end up with 2 columns: Serial number | Name

  • And what is ActionEnum ? - VladD
  • The usual listing of the N-th count of elements. - iluxa1810
  • Then add it to the question, it is not obvious. For example, I thought about this: msdn.microsoft.com/en-us/library/ms681568%28v=vs.85%29.aspx . And the next question is what do Action_id and ActionName ? Are these lines important? And what is dgvPermitionActions , you never talk about it anywhere, we have to guess? - VladD
  • These are 2 attributes of the DataGridView. In Action_id, I want to push the sequence number of the enum, and in ActionName the name of the element. - iluxa1810
  • Yeah, now I see. (Maybe add this to the question?) - VladD

0