Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric Formatting
Message
De
29/02/2008 10:32:32
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01296186
Message ID:
01297714
Vues:
16
Derek,

In my dynamic Grid control (which is based on DataGrid, not DataGridView, so it will *definitely* be different), I do what amounts to the format/parse event handlers with the DataGridTextBoxColumn's GetColumnValueAtRow/SetColumnValueAtRow methods. I've tried looking for comparable methods in various DataGridView columns, cells, etc .... I can't find anything that appears to be of a similar nature.

So, bottom line, I'm not much help. But perhaps knowing what the methods are for this in the DataGrid might aid you in your search for finding something similar for the DataGridView?

~~Bonnie




>With regular textboxes I'm using formatting with DataBindings.Add() and it's working very well.
>
>With my own textbox columns in grids, I want to achieve the same simple and consistent formatting (i.e. C, D, G, F2, etc...).
>
>What I am doing is using the EditingColumnFormattedValue get()/set() for this.
>
>I know grid.Columns["mycolumn"].DefaultCellStyle.Format = "C" sets how it is displayed, but is it the equivalent to DataBindings.Add(), but for columns?
>
>Is this the best place or is there a better place to intercept/control formatting for numbers in textboxes in grid columns (no maskedtextboxes please).
>
>Thanks in advance.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform