Set different decimal format for each row in the same column

Posted by: hirocibi917917 on 3 August 2017, 12:39 pm EST

  • Posted 3 August 2017, 12:39 pm EST

    [Datagrid name="alist"]

    Col1 Col2
    0 1
    1 1.1
    2 1.12
    3 1.123
    4 1.1234


    as above list,
    I want to set the different demical format(#,##0 or #,##0.000, etc) for each row using other columns value.

    (I can find just change the columns format..
    ->

    C1.WPF.DataGrid.DataGridNumericColumn qCol = (C1.WPF.DataGrid.DataGridNumericColumn)alist.Columns["Col2"];
    sNumericCol.Format = alist[row.Index, alist.Columns["Col1"].Index].ToString();

    )


    I hope you can help me.

    Best regards,

    J.

Need extra support?

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

Learn More

Forum Channels