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
130
Custom column Formatting
posted

I have one of my column as amount, i need that to be custom formatted. The format should look like "#,###0.00" Tried this below code, but in the UI i see #,###0.00 in place of numbers.

 protected string Format(ControlDataField field, object value)
        {
            return "#,###0.00";
        }
     protected override void OnInit(EventArgs e)
     {
         ExposureDetailsGrid.Load += (grid, arg) =>
        {
            ((WebDataGrid)grid).Columns[5].FormatFieldMethod = (field, value) =>
            {
                return PRISMConstants.AmountFormat;
            };
        };
     }

Please help me!!

Parents
  • 130
    Offline posted

    This is the code i tried

    protected override void OnInit(EventArgs e)
         {
             ExposureDetailsGrid.Load += (grid, arg) =>
            {
                ((WebDataGrid)grid).Columns[ExposureDetailsGrid.Columns.IndexOf(ExposureDetailsGrid.Columns.FromKey("EXPO_AUTH_AMT"))].FormatFieldMethod = (field, value) =>
                {
                    return "#,###0.00";
                };
            };
         }

Reply Children
No Data