开发者

System.Data.DataRowView displayed in every component

开发者 https://www.devze.com 2022-12-31 15:39 出处:网络
I have开发者_C百科 components that are bind to a binding source, when I add a new row in bindingsource by bindingsource.addnew(), all of them display \'System.Data.DataRowView\' as text.

I have开发者_C百科 components that are bind to a binding source, when I add a new row in bindingsource by bindingsource.addnew(), all of them display 'System.Data.DataRowView' as text. what can I do as a solution?


Been a while since I used ADO type stuff, but I'm guessing that you are binding to the actual DataRowView object, so when it is rendered all you get is a call to ToString(), which is returning the type name. You need to bind to a value within the DataRowView to display a useful value e.g. a column within the DataRowView.


You need to set display member property of the controls to some column name in the data row to show that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号