Column width of a DataGrid in a Windows Mobile Application

一世执手 提交于 2019-12-01 04:53:17

Change this line

tableStyle.MappingName = lista.GetType().ToString();

to

tableStyle.MappingName = lista.GetType().Name;

Oh, and 4000 is a little big for a mobile but I assume that's a typo.

For anyone using a DataTable as the DataSource instead of a list, it appears you have to change:

tableStyle.MappingName = lista.GetType().Name;

to:

tableStyle.MappingName = lista.TableName;

Took me a while to figure this out!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!