Hi,
Given the scenario as below, how could we stop the converter getting executed during grid scroll?
We have applied a converter to allow edit of the grid rows using DropDown. Basically the next grid row (that is dropdown box in the first field of the grid ) could be edited using the DropDown only when the previous rows has data(non blank).
First blank row gets the drop down to enable editing. Other blank rows are non-editable. All non-blank rows remains editable with the dropdown.
The convertor gridRecordConverter is used for this purpose. This converter gets applied while scrolling the grid and eventually does not load the DropDown in the first blank row.
Thanks
<igDP:Field Name="FieldName" Label ="Field Name" Column="1" Row="0" >
<igDP:Field.Settings>
<igDP:FieldSettings CellValuePresenterStyle="{StaticResource thickBorderStyle}" LabelTextAlignment="Left" LabelWidth="200" CellWidth="200" AllowResize="False" AllowEdit="True" AllowGroupBy="False" LabelClickAction="Nothing" EditorType ="{x:Type igEditors:XamComboEditor}">
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamComboEditor}">
<EventSetter Event ="DropDownClosed" Handler ="FieldTypeSelection_Changed"/>
<EventSetter Event ="EditModeEnded" Handler ="FieldTypeSelection_Edited"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Path=DataItem, Converter={StaticResource gridRecordConverter}}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:Field>
Hello,
Thank you for your post. I have been looking into it and I can say that this behavior is expected, since the XamDataGrid has a virtualization by default and when you scroll, the CellValuePresenters are reused. Here you can read more about the Virtualization modes:
http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=InfragisticsWPF4.v12.1~Infragistics.Windows.Controls.ItemContainerGenerationMode.html
Hope this helps you.