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
420
Format as fraction
posted

Is it possible to format as a fraction upto three digits just as in excel. In excel the format string it uses is "# ???/???". I am trying to format one of the column in ultrawingrid.

Thanks in advance.

  • 469350
    Verified Answer
    Offline posted

     Hi,

        This isn't really something the grid has any contorl over. The Format property of a column simply calls the ToString on the cell value and passes in the format. So you should check the Microsoft documentation on the data type of your column and see what kind of format strings it supports. 

        If it doesn't have support for fractions, you might be able to do what you want using a DataFilter. The DataFilter allows you to intercept the value when it moves from the editor to the display and vice-versa. See the Infragistics Knowledge Base for articles and samples of DataFilters.