Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric Formatting
Message
From
29/02/2008 10:32:32
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01296186
Message ID:
01297714
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform