Results 1 to 2 of 2

Thread: DataView Items + Ext.util.Format.ellipsis (any way to do this?)

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    114
    Answers
    5
    Vote Rating
    7
      0  

    Question DataView Items + Ext.util.Format.ellipsis (any way to do this?)

    Is there any way to use Ext.util.Format.ellipsis inline within a DataView template in order to truncate long strings coming in from my store? I need the full string as well as the truncated version, but I don't necessarily want to put the truncated string into my store (if there is a way around it).

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,070
    Answers
    3976
    Vote Rating
    1394
      1  

    Default

    You can do something like this in your template:

    Code:
    {[Ext.util.Format.ellipsis(values.foo, 50)]}
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •