0

My title may be unclear for the question that I am asking.

What I have is a DataGrid with 5 rows. Upon resizing the window, the rows of the DataGrid is supposed to fill up the DataGrid space, meaning I want the 5 rows to be split evenly.

I have acheived this by doing the following:

DataGrid1.RowHeight = DataGrid1.RenderSize.Height / 5);

However sometimes when I press the down arrow key on the last row of the DataGrid, It will go down another row, which is an empty space. I would like to prevent that. Any help is greatly appreciated.

This is the datagrid with 5 rows of data.

Before

When I select a cell from the last row and press the down arrow, this is what I get:

After

  • 2
    Do you mean an empty row for adding new items? You can disable it with `CanUserAddRows="False"` – icebat Feb 24 '16 at 11:25
  • Can you add a screenshot explaining the problem as well as xaml? Is it partially visible next row? See [this](http://stackoverflow.com/q/11123521/1997232) then. – Sinatr Feb 24 '16 at 12:11
  • It is not a new row for adding new items or a partially visible next row. It is just an empty space of the DataGrid. I have added screenshots above. – Juay Wee Liang Feb 25 '16 at 02:04

0 Answers0