Hi Sebastian,
Try the following code( C# ) :

Primitive selectedPrimitive = (Primitive)dataGridView1.Rows
[dataGridView1.CurrentCell.RowIndex].DataBoundItem;

I guess that should do it.

On Dec 20 2008, 7:59 pm, Sebastian <[email protected]> wrote:
> Hello everyone,
>
> I have created a BindingList<Primitive> where Primitive is a class
> which I created myself.
> I am able to bind the BindingList to a DataGridView and it shows the
> information I want to see.
>
> I can select rows using SelectionMode with FullRowSelect. Is it
> possible to retrieve the selected Primitive from the dataGridView (and
> not just the values of the grid cells)?
>
> Many thanks, Sebastian

Reply via email to