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
365
simple question on column formats
posted

Hi All,

I have a DataSet-bound, web grid that I want to set specific numeric columns to a specific number of decimal places.  Nothing fancy, just set 6 decimals in column A, 3 in column B, etc...

I looked through several posts on this subject and I had thought you just set the all the column .Format properties after I DataBind the grid, ie.

foreach (UltraGridColumn column in TagUltraWebGrid.Columns)
  column.Format = "###0.0";

But that did not make any difference - I still got 4 decimal places.

I also tried to set the column format via the displayLayout band and the result was the same.  Am I missing some overriding setting that prevents Column.Format from working?

Thanks for any advice.

Corey.

  • 29417
    Suggested Answer
    Offline posted

    Hello CoreyW ,

     

    I know it has been a while since you poste your question here but if you still need assistance I’d be glad to help.

    Since I’m not sure which version of our product you’re using I’ve tested this on 11.1 and upon setting the Format property for the columns in the Page_Load event everything worked as expected.

    If this issue is still reproducible on your environment I’d request you to provide more information regarding the environment( IG control version, OS, Browser). Otherwise even if such an issue existed is no more reproducible with the newest versions of our controls.

     

    I’m attaching a sample with this for you reference.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

    ColFormat.zip