View Full Version : [CLOSED] GridPanel DragText placeholders

Feb 22, 2013, 9:37 AM

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?


Feb 22, 2013, 9:50 AM
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

Feb 22, 2013, 9:58 AM
I'm using Ext.Net version 2.1.0.

Is it possible in this version?

Thanks for your quickly response.

Feb 22, 2013, 10:05 AM
Please post v2.x question in 2.x Premium Help forum branch
You need to use the following override to add {2} support

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

Feb 22, 2013, 10:16 AM
I'm sorry for post in wrong forum branch.

Your suggestion solved my problem.

Thank you very much.