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
3160
Tab not working correctly
posted

I have a xamdata grid where the first column is an unbound field that contains a custom usercontrol.  The custom control contains two text boxes which allow the user to search by name or ID.  There are other columns in the datagrid. 

The desired behavior is that when the user types into one of the text boxes of the user control, the RecordAdded event will fire just as it does with any other bound field.  I also want the the user to be able to tab from the first column to the second column, etc. 

The current behavior is that when the tab key is pressed and the cursor is in one of the text boxes of the user control, the cursor moves to the next ROW (should be next COLUMN).  Also the Row added and row updated events do not fire unless the user edits a bound field.  See the xaml fragment below.  The bindings work correctly visually i.e. I can see the bound data in the grid.

 

 

 </igDP:XamDataGrid.FieldLayoutSettings>
                <igDP:XamDataGrid.FieldLayouts>
                    <igDP:FieldLayout>
                        <igDP:FieldLayout.Fields>

                            <igDP:UnboundField Label="Account" Width="450">
                                <igDP:UnboundField.Settings>
                                    <igDP:FieldSettings AllowEdit="True" >
                                        <igDP:FieldSettings.CellValuePresenterStyle>
                                            <Style TargetType="{x:Type igDP:CellValuePresenter}">
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate>
                                                            <samsControls:Selector
                                                                Width="450"
                                                                IDTitle="Account No:"
                                                                DescTitle="Account Name:"
                                                                Layout="Horizontal"
                                                                TitleLayout="Horizontal"
                                                                IDTitleWidth="80"
                                                                DescTitleWidth="90"
                                                                IDSearchTextBoxWidth="70"
                                                                DescSearchTextBoxWidth="210"
                                                                SelectedID="{Binding DataItem.ACCT_NO, Mode=TwoWay}"
                                                                SelectedDesc="{Binding DataItem.AccountName, Mode=TwoWay}"
                                                                Selecting="Account_Selecting">
                                                            </samsControls:Selector>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </igDP:FieldSettings.CellValuePresenterStyle>
                                    </igDP:FieldSettings>
                                </igDP:UnboundField.Settings>
                            </igDP:UnboundField>


                            <igDP:Field Name="QUANTITY" Label="Quantity" Width="80">
                                <igDP:Field.Settings>
                                    <igDP:FieldSettings EditorStyle="{StaticResource Decimal5Style}">
                                    </igDP:FieldSettings>
                                </igDP:Field.Settings>
                            </igDP:Field>

Parents
  • 17475
    Offline posted

    Hello Sam, 

    Thank you for posting to our community. 

    I have been looking into the provided code snippet and I created a sample project based on it. It seems that on my side when the tab button is pressed the cursor moves to the next field not to the next record. Would you look at the attached project and let me know if I had missed something in your scenario?

    When the whole template of the CellValuePresenter is changed, some of the functionality may be lost. It seems that this is the reason why the RecordUpdated event is not fired. You can use the default template of the CellValuePresenter located in the DataPresenterGeneric_Express.xaml file in C:\Program Files (x86)\Infragistics\NetAdvantage 2012.2\WPF\DefaultStyles\DataPresenter and add the functionality you need to it. More information regarding a similar issue could be found in this forum post: http://es.infragistics.com/community/forums/p/7462/289274.aspx

    Please feel free to let me know if you have any other questions.

    XamDataGridTab.zip
Reply Children