AD
Administrator
Syncfusion Team
November 10, 2006 07:05 AM UTC
Hi Manoj,
This is the default behavior of the MaskEdit cell type, however to get the desired behavior, you can use DrawCellDisplayText event and set the e.DispalyText to some new value to want to display. Here is a code snippet
private void gridDrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
{
if( e.Style.CellType == "MaskEdit"
&& e.Style.Text != e.DisplayText )
{
int iTrailZero = e.DisplayText.Length - e.Style.Text.Length;
string sTrailZero = string.Empty;
for(int i= 1;isTrailZero += '0';
e.DisplayText = sTrailZero + e.DisplayText.Substring(0,e.DisplayText.Length-iTrailZero + 1);
}
}
Best Regards,
Haneef