Note that there are some explanatory texts on larger screens.

plurals
  1. PODataGridTemplateColumn EditingElementStyle equivalent
    primarykey
    data
    text
    <p>I am coding the following piece of code and it is looking like it is functional. However once I get a validation error it stays even if the validation error has been corrected. I am using validation at row level as well as at cell level on my <code>DataGridTextColumn</code> using the <code>EditingElementStyle</code> parameter but this can't be used in a <code>DataGridTemplateColumn</code>. Is there an equivalent that I can use as I am not sure how to proceed. Below is a sample of my code showing one of my <code>DataGridTextColumns</code> and my <code>DataGridTemplateColumn</code>.</p> <pre><code>&lt;dg:DataGridTemplateColumn Header="Instrument" MinWidth="140"&gt; &lt;dg:DataGridTemplateColumn.CellTemplate&gt; &lt;DataTemplate &gt; &lt;TextBlock Text="{Binding Path=PRODUCTNO, Mode=TwoWay}"/&gt; &lt;/DataTemplate&gt; &lt;/dg:DataGridTemplateColumn.CellTemplate&gt; &lt;dg:DataGridTemplateColumn.CellEditingTemplate&gt; &lt;DataTemplate&gt; &lt;ComboBox IsEditable="True" ItemsSource="{StaticResource TestList}"&gt; &lt;ComboBox.Text&gt; &lt;Binding Path="PRODUCTNO" UpdateSourceTrigger="PropertyChanged"&gt; &lt;Binding.ValidationRules&gt; &lt;ValidationRules:IntegerValidationRule /&gt; &lt;/Binding.ValidationRules&gt; &lt;/Binding&gt; &lt;/ComboBox.Text&gt; &lt;/ComboBox&gt; &lt;/DataTemplate&gt; &lt;/dg:DataGridTemplateColumn.CellEditingTemplate&gt; &lt;/dg:DataGridTemplateColumn&gt; &lt;dg:DataGridTextColumn Header="BATCH No." Width="100" EditingElementStyle="{StaticResource CellEditStyle}"&gt; &lt;dg:DataGridTextColumn.Binding&gt; &lt;Binding Mode="TwoWay" Path="BATCHNO"&gt; &lt;Binding.ValidationRules&gt; &lt;ValidationRules:StringValidationRule/&gt; &lt;/Binding.ValidationRules&gt; &lt;/Binding&gt; &lt;/dg:DataGridTextColumn.Binding&gt; &lt;/dg:DataGridTextColumn&gt; </code></pre>
    singulars
    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