Note that there are some explanatory texts on larger screens.

plurals
  1. PODataGrid store value in an item of<T> which is member of a list
    primarykey
    data
    text
    <p>I have an observableCollection of type Season and the Season has a property of type Rate.</p> <p>I am trying to display in UI the seasons and for each season the user must fill in a textBox with his/her desired rate.</p> <p>This is the xaml code</p> <pre><code>&lt;DataGrid DockPanel.Dock="Bottom" ItemsSource="{Binding Path=SeasonsList}" AutoGenerateColumns="False" Height="249" HorizontalAlignment="Left" VerticalAlignment="Top" Width="454" Margin="12,0,0,0"&gt; &lt;DataGrid.Columns&gt; &lt;DataGridTemplateColumn Header="test" Width="*"&gt; &lt;DataGridTemplateColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;Grid&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="450*" /&gt; &lt;RowDefinition Height="450*" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="100" /&gt; &lt;ColumnDefinition Width="80" /&gt; &lt;ColumnDefinition Width="10" /&gt; &lt;ColumnDefinition Width="80" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Label Content="Season" Grid.Column="0" Grid.Row="0"&gt;&lt;/Label&gt; &lt;Label Content="{Binding From}" Grid.Column="1" Grid.Row="0"&gt;&lt;/Label&gt; &lt;Label Content="-" Grid.Column="2" Grid.Row="0"&gt;&lt;/Label&gt; &lt;Label Content="{Binding To}" Grid.Column="3" Grid.Row="0"&gt;&lt;/Label&gt; &lt;Label Content="Rate" Grid.Column="0" Grid.Row="1"&gt;&lt;/Label&gt; &lt;TextBox Width="150" Grid.Column="1" Grid.Row="1" Text="{Binding Path=Rate.RoomRate,Mode=TwoWay}"&gt;&lt;/TextBox&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; &lt;/DataGridTemplateColumn.CellTemplate&gt; &lt;/DataGridTemplateColumn&gt; &lt;/DataGrid.Columns&gt; &lt;/DataGrid&gt; </code></pre> <p>In viewModel I expect to get the seasonsList with value in property Rate.RoomRate.</p> <p>Am I doing something wrong in my code or the logic of the implementation is wrong?</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload