i'm trying to hide the first column ("id") of a lookupedit after I load the coresponding dataset.
lCapitol.Properties.DataSource = nContabDataSet.Tables["capitol"];
lCapitol.Properties.Columns[0].Visible = false; //also tried lCapitol.Properties.Columns["id"].Visible = false;
lCapitol.Properties.DisplayMember = "Cod";
lCapitol.Properties.ValueMember = "id";
at the second line i get the following error:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
OR Object reference not set to an instance of an object. when when using ["id"].