Binding a Dictionary to the DataGridView in C#?

This. DataGridViewTest. DataSource = listSmiles.Values.

Kane: I tried doing this, however this didn't work. – tush1r Nov 2 '09 at 5:19.

Yes ,by Calling ToArray of Dictionary var g = this. DataGridView1; var s = new Dictionary(); s. Add("1", "Test1"); s.

Add("2", "Test2"); s. Add("3", "Test3"); g. DataSource = s.ToArray().

If the question relates to WPF or silverlight, this article gives a solution. I've been using it and it performs well, even for large numbers of columns.

Phillip: This is for Winforms application. – tush1r Nov 2 '09 at 5:18.

I know this is a bit old, but perhaps it will help someone. This one line solution worked for me.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions