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
453
Formatting the text in the UltraGrid column
posted

Update: if you use the formatter as 'n' for number, it works fine...!

The data I am getting from the database is in the RAW format. For example, if I am tracking the price of the item, it will be 23.45343 . I need to display in the form of 23.45.

I also need to take care of the rounding the values. Also, adding ',' for every thousands e.g. 1,000,000.01 But I do not need currency specifier along with it. e.g. $. I can add formats such as c, d. But I need the currency specifier removed.

I also need to handle percentages, to show, 2.1 as 2.1%

Now, I can use 'p' to format it as %, but the problem here is the data I am getting from the DB is already in %. But the number doesnt have the % sign, which I need to add to the cells.

Is it possible to do that? If yes, how?

Another Update:

The datetime data I am getting from the database is like this: "Fri Sep 05 00:00:00 EDT 2008"

I need to convert it to MM/dd/yyyy format. I have tried using format strings like d,g,etc. But I am not able to format it. Is there any way where we can manually format the data of the column?

I'll really appreciate your help in this regards.

Thanks :)

Parents
  • 453
    posted

    I already had a post on this. But had many updates after that and hence posting it again.

    I am using UltraGrid for my application. One of the columns' data which I am getting from the DB contains a % value. And, I need to display that as '% ' in the grid. e.g. 2.1 --> 2.1%. So, I can not use the formatter 'p' for this.

    Moreover, for another column, I am getting the date as, 'Fri Sep 05 00:00:00 EDT 2008'. I tried using the formatters like 'd', 'g', but it is not working. Is there any way to format it such that, I can format the value in MM/dd/yyyy format?

    I'll really appreciate your help in this regards.

    Thanks :)

Reply Children