objects in datagridview

Posted by JaSk on Stack Overflow See other posts from Stack Overflow or by JaSk
Published on 2010-04-23T17:58:54Z Indexed on 2010/04/23 18:03 UTC
Read the original article Hit count: 373

Filed under:
|
|

Im adding objects to a datagridview ( only one kind) through a list ej.

List<Material> mater = new List<Material>();
DataGridView dgvMAterial = new DataGridView();

dgvMaterial.DataSource = null;
mater.Add((Material)cmbMaterial.SelectedValue);
dgvMaterial.DataSource = mater;

But every time I click over the datagrid I get an indexoutofrangeexeption. Can somone tell me why? thanks

© Stack Overflow or respective owner

Related posts about .NET

Related posts about datagridview