[CLOSED] GridPanel DragText placeholders

  1. #1

    [CLOSED] GridPanel DragText placeholders

    Hello!

    I realized in the documentation of DragDrop plugin that there are two two placeholders, as the following text:

    dragText : String
    The text to show while dragging.

    Two placeholders can be used in the text:

    {0} The number of selected items.
    {1} 's' when more than 1 items (only useful for English).
    Defaults to: '{0} selected row{1}'

    Available since: Ext 4.1.1

    I need to know how can I create a new placeholder "{2}" with "es" value when more than 1 items are selected?

    Thanks.
  2. #2
    Do you use Ext.Net v1.x?
    If yes then that option is not available because latest v1.x (1.6) version uses ExtJs 3.4 but that option is avaible since ExtJS 4 only
  3. #3
    I'm using Ext.Net version 2.1.0.

    Is it possible in this version?

    Thanks for your quickly response.
  4. #4
    Please post v2.x question in 2.x Premium Help forum branch
    You need to use the following override to add {2} support
    Ext.view.DragZone.override({
        getDragText: function() {        var count = this.dragData.records.length;
            return Ext.String.format(this.dragText, count, count == 1 ? '' : 's',  count > 1 ? 'es' : '');
        }
    });
    Please update String.format arguments as required
  5. #5
    I'm sorry for post in wrong forum branch.

    Your suggestion solved my problem.

    Thank you very much.

Tags for this Thread

Posting Permissions