0

I have a main datagrid with row details. The row details expand to another datagrid as shown below.

Here is the question, in the main datagrid, I put * in the width in the column, e.g.

 <DataGridTextColumn Header="CUSTOMER" IsReadOnly="True" Width="100*" Binding="{Binding CUSTOMER_CODE, UpdateSourceTrigger=PropertyChanged}" />

It worked as it supposed to. It automatically fills the empty space of the datagrid.

However, I put the same * in the width in the row detail datagrid DataGridTextColumn. It seems to have absolutely no effect. See screenshot. enter image description here

Could some one help me please? Thank you!

Community
  • 1
  • 1
Heisenberg
  • 764
  • 6
  • 20
  • What is the container of the second DataGrid? Does [this](https://stackoverflow.com/questions/14003449/why-width-doesnt-work-for-columns-in-datagrid-located-in-rowdetailstemplate) help? Or [this](https://stackoverflow.com/questions/11956023/how-to-make-the-last-datagrids-column-occupy-the-whole-left-space)? – Kilazur Apr 04 '18 at 15:46
  • OMG The link worked! Thank you so much. I was looking for the answer for such a long time. You are a saver! Thank you! – Heisenberg Apr 04 '18 at 15:50
  • No prob, I'm now flagging as a duplicate if you don't mind – Kilazur Apr 04 '18 at 16:08

0 Answers0