We help IT Professionals succeed at work.

Avoiding displaying ID a dataGridView

adamtrask
adamtrask asked
on
Hello experts,

I am using an unbound dataGridView to display data from an sql database table.
In other words I use code to retrieve the data from the table.

In order to write code that deletes records in the table I need the ID of each record which I don't want to display in the dataGridView.

Is there a way to do that....?

Thank
Comment
Watch Question

datagrid.Columns[columnIndex].Visible = false;

Author

Commented:
Sounds very easy.... why didn't I think of that.... Thank you

Author

Commented:
Very good