DataGridView Custom format for phone number
hello everyone! trying phone number custom format column in datagridview, nothing try works! ideas on how fix this? here's code:
private void tbl_alunosdatagridview_cellformatting(object sender, datagridviewcellformattingeventargs e)
{
try
{
this.tbl_alunosdatagridview.columns["telfixo"].defaultcellstyle.format = "(##) ####-####";
this.tbl_alunosdatagridview.columns["telcelular"].defaultcellstyle.format = "(##) #####-####";
}
catch (exception)
{
}
}
jcrcarmo
problem solved !!!
alll had change type of phone number fields int double on database , vs2015 built-in custom format works perfectly! easier thought. :d
jcrcarmo
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment