DataGridNumericColumn UpDown Buttons Visibility

Posted by: mayur.purandare on 29 March 2023, 5:44 am EST

    • Post Options:
    • Link

    Posted 29 March 2023, 5:44 am EST

    In a C1DataGrid, we have a DataGridNumericColumn.

    For DataGridNumericColumn, the UpDownKeys will be visible upon selecting the column (this is normal behavior). [On Single Clicking the cell]

    Is there any property that can make the UpDownKeys to be visible always, even before selecting the column?

  • Posted 30 March 2023, 8:33 am EST

    Hi Mayur,

    To show Increment/Decrement buttons on a DataGrid column even when it’s not selected, you need to create a DataGridTemplateColumn with a numeric box inside its template. Here’s an example of the code you can use.

    <c1:DataGridTemplateColumn Header="Price">
        <c1:DataGridTemplateColumn.CellTemplate>
            <DataTemplate>
                <c1:C1NumericBox Value="{Binding Price, Mode=TwoWay}" Format="c"/>
            </DataTemplate>
        </c1:DataGridTemplateColumn.CellTemplate>
    </c1:DataGridTemplateColumn>

    Kindly refer to the attached sample for full implementation. See NumericColumnDataGrid.zip

    Thanks & Regards,

    Aastha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels