private void DataGrid_AutoGeneratingColumn(object sender, AutoGeneratingColumnArgs e)
{
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
{
if (e.Column.MappingName == "OrderID" || e.Column.MappingName == "EmployeeID" || e.Column.MappingName == "CustomerID")
e.Column.Width = 40;
else
e.Column.ColumnSizer = ColumnSizer.Star;
}
else if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone)
{
if (e.Column.MappingName == "OrderID" || e.Column.MappingName == "EmployeeID" || e.Column.MappingName == "CustomerID")
e.Column.ColumnSizer = ColumnSizer.Star;
else
e.Column.ColumnSizer = ColumnSizer.Auto;
}
}
|