Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datagrid - blank if zero
Message
De
09/07/2004 10:50:30
 
 
À
09/07/2004 09:59:32
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00922476
Message ID:
00922511
Vues:
10
I had to do something similar to this a while back. What I did was override the DataGridTextBoxColumn (I had to do this for several reasons).

In the paint event, I captured the column object by using GetColumnValueAtRow(). I set the text to blank if the column object evaluated to zero and it was a numeric column. Then I'd issue a drawstring function with the 'new' blank text.

It works fine for me, though I always wondered if there was a simpler way.

I always wondered if there was an easier way, but I never found a property or format mask that I could set.

I see that someone just responded with a message on custom formatting, so you should probably try that first (and I think I'll check it out as well). If that doesn't work and no one has a simpler solution, I can post a code sample.

Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform