Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
900
XAMGridrid GroupByRow
posted

 

Hi,

After Grouping Silverlight XAMGrid by one column, While using xamGrid GroupByrow (by 1 column), for the  second 2nd Group, the Control property is always null. I am using following code to change focus from Hour textbox to minute textbox once 2 digits are entered in hours textbox. 

 

Probem: Following is always null for 2nd Group in xamGrid GroupByrow. For 1st Group its returns controls on the Cell. 

((Infragistics.Controls.Grids.Primitives.GroupByRow)(xamGrid.Rows[0])).Cells[5].Control

 

C# Code:

StackPanel sp = ((TUdgTargetTSSearchResults.Rows[currRow].Cells[5].Control) as ContentControl).Content as StackPanel;

                    XamNumericEditor item2 = sp.Children[2] as XamNumericEditor;

                    item2.Focus();

 

 

XAML:

 

<ig:TemplateColumn Key="MyTime" HeaderText="Idea Time" IsSummable="False" MinimumWidth="80" MaximumWidth="320" Width="Auto" IsSortable="False" IsGroupable="False" IsHideable="False">

                                        <ig:TemplateColumn.ItemTemplate>

                                            <DataTemplate>

                                                <StackPanel Orientation="Horizontal" Margin="3,5,3,5" DataContext="{Binding}" >

                                                    <sdk:DatePicker 

                                                        x:Name="MyDate"

                                                        Grid.Row="0" Width="100"

                                                        Margin="3,0,10,0" 

                                                        BorderBrush="DeepSkyBlue"

                                                        DisplayDate="{Binding Path=MyDate}"

                                                        SelectedDate="{Binding Path=IdeaDate, Mode=TwoWay}"

                                                        Visibility="Collapsed"

                                                        Loaded="MyDate_Loaded"

                                                        />

 

                                                    <ig:XamNumericEditor x:Name="MyHour" Width="30" Margin="0,0,5,0" Mask="{}{double:-2.0}" Value="{Binding MyHour, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Tag="MyHour" GotFocus="XamNumericEditor_GotFocus" LostFocus="XamNumericEditor_LostFocus" KeyUp="MyHour_KeyUp" KeyDown="MyHour_KeyDown_1"/>

                                                    <ig:XamNumericEditor x:Name="MyMinute" Width="30" Margin="0,0,5,0" Mask="{}{double:-2.0}" Value="{Binding MyMinute, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Tag="MyMinute" GotFocus="XamNumericEditor_GotFocus" LostFocus="XamNumericEditor_LostFocus" KeyUp="MyMinute_KeyUp" />

                                                    <ig:XamNumericEditor x:Name="MySecond" Width="30" Margin="0,0,5,0" Mask="{}{double:-2.0}" Value="{Binding MySecond, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Tag="MySecond" GotFocus="XamNumericEditor_GotFocus" LostFocus="XamNumericEditor_LostFocus" KeyUp="MySecond_KeyUp" KeyDown="MySecond_KeyDown"/>

                                                </StackPanel>

                                            </DataTemplate>

                                        </ig:TemplateColumn.ItemTemplate>

 

Parents Reply Children
No Data