I have a custom field definition that I created in SharePoint 2010.
I basically followed the pattern set forth in this MS walkthrough. - then I changed their custom 'Field' example which inherits from 'SPFieldText' to instead inherit from SPFieldNumber, and my FieldControl inherits from NumberField.
Also, here's my field definition XML:
<?xml version="1.0" encoding="utf-8" ?>
<FieldTypes>
<FieldType>
<Field Name="TypeName">Wps</Field>
<Field Name="SQLType">int</Field>
<Field Name="InternalType">Integer</Field>
<Field Name="ParentType">Number</Field>
<Field Name="TypeDisplayName">Client WPS integer</Field>
<Field Name="TypeShortDescription">Client WPS number</Field>
<Field Name="UserCreatable">TRUE</Field>
<Field Name="ShowOnListCreate">TRUE</Field>
<Field Name="ShowOnSurveyCreate">TRUE</Field>
<Field Name="ShowOnDocumentLibraryCreate">TRUE</Field>
<Field Name="ShowOnColumnTemplateCreate">TRUE</Field>
<Field Name="FieldTypeClass">MyCompany.SharePoint.WpsField, $SharePoint.Project.AssemblyFullName$</Field>
</FieldType>
</FieldTypes>
Like Karel, I had defined everything well enough that all commas were squashed.. except in the edit form.
I ended up adding some javascript to the custom .ascx that is part of my custom field definition.
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="VB" %>
<SharePoint:RenderingTemplate ID="WpsFieldControl" runat="server">
<Template>
<span id="commaField">
<asp:TextBox ID="TextField" runat="server" Width="120px" />
</span>
<script type="text/javascript">// <![CDATA[
var numFld = document.getElementById("commaField").childNodes[0];
numFld.value = numFld.value.replace(",", "");
// ]]>
</script>
</Template>
</SharePoint:RenderingTemplate>
Note that I wrapped my ASP.NET TextBox in a simple SPAN with an ID that I could easily locate the field using getElementById in my JS. This was acceptable in my scenario, because the nature of our business would only ever require a single instance of my field type on a given SharePoint list record.
This seemed to solve everything for me! Maybe not the prettiest, but, I like that I don't have to clog up my list definitions with calculated columns.