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
1660
Decimal Column formatting upto 2 digits and tooltip
posted

I have a Hiearchical datagrid like this.Here I want to format the decimal columns upto 2 digits like 7.54, 7.72 such as PF Return 3M and Benchmark Return 3M. But in the tooltip of specific cell show the exact value like this 7.5492867281471 and 7.72473154714779...

How can i produce this..

Thanks in advance.

Hierarchical Datagrid

Parents
  • 16310
    Offline posted

    Hello,

    You can do this using the DataFormatString property of the column. You have to set it to {0:F2}:

    Code behind:

                BoundDataField field = new BoundDataField();
                field.Key = "id";
                field.DataFieldName = "id"
                field.DataFormatString = "{0:F2}"

    Markup:

                    <ig:BoundDataField DataFieldName="id" DataFormatString="{0:F2}" Key="id">
                        <Header Text="id">
                        </Header>
                    </ig:BoundDataField>

    Please let me know if you have further questions on the matter.

Reply Children
No Data