Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DatagridView displaying mask
Message
From
02/08/2010 22:29:45
Luis Navas
Independent Consultant
Auckland, New Zealand
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
DatagridView displaying mask
Environment versions
Environment:
C# 3.0
OS:
Windows 7
Network:
Windows 2003 Server
Application:
Desktop
Miscellaneous
Thread ID:
01474927
Message ID:
01474927
Views:
117
Hi guys.

I have a columns storing a string like HHA121311 for display purposes historically the user is used to seeing HHA-1213-11

How can I show that format (mask) in the grid cells of that column?

For normal entry forms, it's easy to use the MaskedTextbox, and I also have found how to subclass it to enabled it to be part of the DataGridView but the main problem I'm facing with that approach is that it only displays the mask for the current cell and in edit mode, and this grid is read only and I want to show the format for all the visible cells of that column.

I don't want to change the string in the table column, or create another column for it, since it will require change in several places of the application, and I'm hoping there's an easier way of achieving this.

Thanks in advance.

Luis
I never forget a face, but in your case I will make an exception :-)
Reply
Map
View

Click here to load this message in the networking platform