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
620
CellClickAction behavior
posted

Hi,

The following applies to 15.1.  I set a 'global' CellClickAction="SelectCell" setting and, as expected, all of my XamDataGrid fields then required a double-click to enter edit mode.  I then set a 'local'  CellClickAction="Default" on one of the checkbox fields.  I was expecting that a single-click would be all that is needed to change the value of the checkbox.  However, a double-click was still needed to change the value.  What am I missing?  Shouldn't the 'local' setting override the 'global' setting?  I tried the same test on a CurrencyField, and saw the same issue.

       <igWPF:XamDataGrid DataSource="{Binding DataList}">           
            <igdp:XamDataGrid.FieldSettings>
                <igdp:FieldSettings CellClickAction="SelectCell" />
            </igdp:XamDataGrid.FieldSettings>
           
            <igdp:XamDataGrid.FieldLayouts>
                <igdp:FieldLayout>
                    <igdp:FieldLayout.Settings>
                        <igdp:FieldLayoutSettings AutoGenerateFields="False" SupportDataErrorInfo="RecordsAndCells" />
                    </igdp:FieldLayout.Settings>
                   
                    <igdp:FieldLayout.Fields>
                        <igdp:CheckBoxField Name="IsApproved" >
                            <igdp:CheckBoxField.Settings>
                                <igdp:FieldSettings CellClickAction="Default" />
                            </igdp:CheckBoxField.Settings>
                            <igdp:CheckBoxField.CellBindings>
                                <igdp:CellBinding Property="IsEnabled" Target="Editor" Binding="{Binding Path=DataItem.CanEditIsApproved}"/>
                            </igdp:CheckBoxField.CellBindings>
                        </igdp:CheckBoxField>

                        <igdp:CurrencyField Name="Salary">
                            <igdp:CurrencyField.CellBindings>
                                <igdp:CellBinding Property="IsEnabled" Target="Editor" Binding="{Binding Path=DataItem.CanEditSalary}"/>
                            </igdp:CurrencyField.CellBindings>
                        </igdp:CurrencyField>
                    </igdp:FieldLayout.Fields>
                </igdp:FieldLayout>
            </igdp:XamDataGrid.FieldLayouts>
        </igWPF:XamDataGrid>

Parents
No Data
Reply
  • 16495
    Verified Answer
    Offline posted

    Hello Tory,

     

    Thank you for your post.

     

    I have been looking into your issue and the code snippet that you have provided. What I can suggest in order to be able to achieve the functionality that you are looking for is to set the CellClickAction property for local fields to EnterEditModeIfAllowed. From the following link from our online documentation you can read more details about EnterEditModeIfAllowed:

     

    http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/InfragisticsWPF4.DataPresenter.v15.1~Infragistics.Windows.DataPresenter.CellClickAction.html

     

    Field search its settings first from the local FieldSettings, than from the FieldSettings of FieldLayout and finally from the FieldSettings of the XamDataGrid. If you set CellClickAction property to Default in the local setting, it is equal to set it to nothing and it will inherit  the settings from the FieldSettings of FieldLayout or FieldSettings of the XamDataGrid.  

     

    Please let me know if you need any further assistance on the matter.  

Children