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
240
How to redirect cell click event to another cell in the same row?
posted

Hello,

I have a simple grid with two columns and I am trying click event to be redirected to the neighboring cell, so edit would be activated.

Right now when I click the left cell, I get this:

When I click the left cell, the result I am looking for is this:

I am not sure what would be the best way to approach it. Should I write a custom template or handle the event in the code?

Thank you.

  • 30945
    Offline posted

    Hello,

     

    I am just checking if my post was helpful for you.

     

    If you require any further assistance please do not hesitate to ask.

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics, Inc.

    www.infragistics.com/support

  • 30945
    Verified Answer
    Offline posted

    Hello,

     

    The reason that you are getting this result is that the data type of the Age field is string and you are using XamNumericEditor. The XamNumericEditor is used for editing numeric data and you can avoid this behavior by:

     

    1.       Changing the property’s type that the Field is bound to, to numeric data type.

    2.       Set FieldSettings’ EditAsType property to some of the numeric data types. For example:

     

    <Window      

    ………………………………………

            xmlns:sys="clr-namespace:System;assembly=mscorlib"

     

    ………………………………………

     

                                                    <igDP:Field Name="Age" Label="Ages">

     

                            <igDP:Field.Settings>

     

                                <igDP:FieldSettings

                                    EditAsType="{x:Type sys:Int32}"

    ………………………………………

    If you require any further assistance on the matter please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics, Inc.

    www.infragistics.com/support

  • 30945
    Offline posted

    Hello,

     

    If you want to use XamNumericEditor in your cell I can suggest you to set FieldSettings’ EditorType property to XamNumericEditor. You can do that as follows:

     

    <igDP:Field Name="Age" Label="Ages">

    <igDP:Field.Settings>

    <igDP:FieldSettings EditorType="{x:Type igEditors:XamNumericEditor}">

    </igDP:FieldSettings>

    </igDP:Field.Settings>

    </igDP:Field>

     

     

    By doing so you will keep the functionality that you need and you will have XamNumericEditor in your cell. You can also add this:

    <igDP:FieldSettings.EditorStyle>

    <Style TargetType="{x:Type igEditors:XamNumericEditor}">

    <!-- Change editor's setting if needed -->

    </Style>

    </igDP:FieldSettings.EditorStyle>

     

    in the FieldSettings for the Field that you want in order to change the XamNumericEditor as you need.

     

    If you require any further assistance on the matter please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics, Inc.

    www.infragistics.com/support