Programmatically Setting a GridView dataFormat String at Runtime

B

Brett

I have number of decimal places in a table's column. For example
Stat1 Stat1DecimalPlaces
2590 2
7356 4
8211 3
etc.

I want to set the DataFormatString at runtime based on the number of decimal
places. Any way to do this?

Thanks
 
A

AlBruAn

Could you rephrase your question as it isn't very clear what your intent is
.... at least not to me.

Do you mean that if Stat1DecimalPlaces = 2, values for Stat1 would be
displayed as 25.90, 73.56, and 82.11, respectively? And that if
Stat1DecimalPlaces = 3, the same values would be displayed as 2.590, 7.356
and 8.211, respectively?
 
B

Brett

You are correct.

AlBruAn said:
Could you rephrase your question as it isn't very clear what your intent is
... at least not to me.

Do you mean that if Stat1DecimalPlaces = 2, values for Stat1 would be
displayed as 25.90, 73.56, and 82.11, respectively? And that if
Stat1DecimalPlaces = 3, the same values would be displayed as 2.590, 7.356
and 8.211, respectively?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top