I have this grid:
<igGrid:XamGrid x:Name="GridLotes" > <igGrid:XamGrid.Columns> <igGrid:TemplateColumn Key="Especificacao" Width="400" MinimumWidth="300" IsSortable="True"> <igGrid:TemplateColumn.HeaderTemplate> <DataTemplate> <TextBlock Text="ESPECIFICAÇÃO" HorizontalAlignment="Left" /> </DataTemplate> </igGrid:TemplateColumn.HeaderTemplate> <igGrid:TemplateColumn.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Especificacao}" x:Name="GridLotesEspecificacao" HorizontalAlignment="Left" TextWrapping="Wrap" /> </DataTemplate> </igGrid:TemplateColumn.ItemTemplate> </igGrid:TemplateColumn> <igGrid:TemplateColumn Key="Preco" CellStyle="{StaticResource GridCellEdit}" Width="130" MinimumWidth="130"> <igGrid:TemplateColumn.HeaderTemplate> <DataTemplate> <TextBlock Text="PREÇO" HorizontalAlignment="Left" /> </DataTemplate> </igGrid:TemplateColumn.HeaderTemplate> <igGrid:TemplateColumn.ItemTemplate> <DataTemplate> <igEditors:XamNumericEditor Mask="{}{double:9.4}" x:Name="GridLotesPreco" Background="Transparent" BorderThickness="0" LostFocus="GridPropostasCellPreco_LostFocus" GotFocus="GridPropostasCellPreco_GotFocus" Value="{Binding Preco, Mode=TwoWay}" Margin="0,0,0,0" /> </DataTemplate> </igGrid:TemplateColumn.ItemTemplate> </igGrid:TemplateColumn> </igGrid:XamGrid.Columns></igGrid:XamGrid>
And I want to find these 2 controls "GridLotesPreco" and "GridLotesEspecificacao" to change his proprties in dynamically.
How can I find these controls ?
Hi,
What kind of properties are you trying to change?
The recommended way of doing these types of things is generally through bindings.
The xamGrid virtualizes/recycles all cell controls, so you can't really change just one cells dynamically in code behind. Otherwise, when you do, it'll show up changed on another row when you scroll.
If you're just trying to modify styles based on value changing, you can take a look at our Conditional Formatting feature.
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=xamGrid_Conditional_Formatting.html
-SteveZ