Column width of a DataGrid in a Windows Mobile Application

前端 未结 2 1333
余生分开走
余生分开走 2021-01-12 11:04

I\'m having problems trying to adjust the width of a column of a datagrid. I used the answer posted here, but I can\'t solve it.

I\'m using a List of objects as a da

2条回答
  •  旧时难觅i
    2021-01-12 11:44

    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!

提交回复
热议问题