1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    48
    Vote Rating
    0
    eaglefox12 is on a distinguished road

      0  

    Default Answered: How to format phone number in grid column in ext

    Answered: How to format phone number in grid column in ext


    I am trying to format phone number on a grid column from 1234567890 to 123-456-7890. I tried something of this sort to do...


    renderer: Ext.util.Format.dateRenderer('Y-m-d') but obviously this only works for date. Is there a way to render phone numbers?

  2. Lots of ways to do it... Here's one:

    Code:
    renderer: function(value) {
        return value.replace(/^(\d{3})(\d{3})(\d{4})$/, '$1-$2-$3');
    }

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,573
    Answers
    540
    Vote Rating
    310
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Lots of ways to do it... Here's one:

    Code:
    renderer: function(value) {
        return value.replace(/^(\d{3})(\d{3})(\d{4})$/, '$1-$2-$3');
    }

  4. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    48
    Vote Rating
    0
    eaglefox12 is on a distinguished road

      0  

    Default


    Quote Originally Posted by skirtle View Post
    Lots of ways to do it... Here's one:

    Code:
    renderer: function(value) {
        return value.replace(/^(\d{3})(\d{3})(\d{4})$/, '$1-$2-$3');
    }
    Thank you skirtle... much appreciated

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi