WPF datagrid empty row at bottom

后端 未结 5 794
忘掉有多难
忘掉有多难 2020-12-23 15:51

I bind my datagrid using

//fill datagrid
public DataTable GameData
{
    get
    {
        DataSet ds = new DataSet();
        FileStream fs = new FileStream         


        
5条回答
  •  粉色の甜心
    2020-12-23 16:24

    If you're creating DataGrid on-the-fly through Source Code...

    DataGrid grid = new DataGrid();
    
    grid.CanUserAddRows = false;
    
    //... 
    grid.AutoGenerateColumns = false;
    grid.Margin = new Thickness(10,20,10,10);
    grid.VerticalAlignment = VerticalAlignment.Top;
    grid.ItemsSource = //... and so on
    

提交回复
热议问题