Hey there.

I have a problem. But to make a Long story short, ill just say what i want to accomplish.

I have a Datagridview, I can re-arrainge the data inside of it, by clicking the column headers to "auto-Sort" my data. But now i insert another database into the datagridview, (After clearing it of course). But NOW when i want to use the auto-sort funcion it throws a "null Reference Exception". I can see that little arrow on the column header didnt disappear when i cleared the datatable and gridview.

I dont know of any Reset-datagridview-methods, so the only solution i can see is Disposing the Datagridview and re-opening it, but i dont know if that is possible.

Thank you =)

Yes, you can:

MydataGridView = null;
MyDataGridView = new DataGridView();

Hope this helps

This worked indeed =)
Thank you lolafuertes =)

So, please, be so kind to mark this thread as solved.
Thanks in advance.

ahh sorry, i thought i did it?
=) Here you go.
And thanx again.

This question has already been answered. Start a new discussion instead.