How can I bind protobuf-net generated class to DataGridView ?

26 views
Skip to first unread message

xiaosu

unread,
Apr 11, 2012, 4:55:42 AM4/11/12
to prot...@googlegroups.com
Hi, 
I'm using protobuf-net in my C# project, and I have a proto file declared like this :

message CommandMessageList{
repeated CommandMessage Command=1;
}
message CommandMessage { 
  required string Command = 1; 
  repeated string Parameters= 2;
}

I created a CommandMessageList object called "list" and added several CommandMessage objects to list.CommandList 
then I tried to bind the list.CommandList to a DataGridView on a winform application by using  dataGridView1.DataSource = list.CommandList;  
but i got nothing... 
I'm sure that the "list" object was successfully created and "list.CommandList" was filled with many proper CommandMessage objects.
How can I use the CommandMessageList object as a  data source for winform controls?? 

Thank you! 
Reply all
Reply to author
Forward
0 new messages