PDA

View Full Version : [CLOSED] FileUploadField in GridPanel



jamesand
Oct 21, 2013, 12:45 PM
Hi all! I have a GridPanel and I would like to include a FileUploadField when editing the row. I've been searching for a solution but every answer found are refered to 1.X version and it was not possible.

As I'm working with 2.X, is it possible to include a FileUploadField in a GridPanel now?

Thank you in advance.

Vladimir
Oct 21, 2013, 1:48 PM
Hi

Still no but you can use new MultiUpload component
Please see the following sample
http://examples2.ext.net/#/MultiUpload/Basic/Grid/

jamesand
Oct 21, 2013, 1:56 PM
It doesn't solve the issue, but thank you anyway Vladimir.

I guess I can always use windows.

Regards.

Daniil
Oct 22, 2013, 4:02 AM
I guess I can always use windows.

Could you, please, clarify what you mean? Do you have a TriggerField as a Column's Editor and open a Window with a FileUploadField on trigger click?

jamesand
Oct 22, 2013, 9:46 AM
Could you, please, clarify what you mean? Do you have a TriggerField as a Column's Editor and open a Window with a FileUploadField on trigger click?

In fact I was going to use DirectEvents, but I prefer your solution. The thing is that following this thread:

http://forums.ext.net/showthread.php?18005-TriggerField-as-Editor-into-GridPanel

I don't know how to get the record values inside the TriggerClick Handler. Here is my code:


<ext:Column runat="server" Text="" DataIndex="ICONO">
<Editor>
<ext:TriggerField ID="codigoEditorTriggerField" runat="server" DataIndex="ID_CAMPEONATO" >
<Triggers>
<ext:FieldTrigger Icon="SimpleEllipsis" Tag="seleccionar" />
</Triggers>
<Listeners>
<TriggerClick Handler="triggerCampeonatosClick(this, trigger, tag, true, 0);" />
</Listeners>
</ext:TriggerField>
</Editor>
<EditorOptions CompleteOnEnter="true" CancelOnEsc="true" Shadow="None" RevertInvalid="true" />
<Renderer Fn="renderIconoCampeonatos" />
</ext:Column>


var triggerCampeonatosClick = function (el, trigger, tag, auto, index) {
var w = #{wdwSubirIcono};
alert(el.record.data.ID_CAMPEONATO);
w.show();
};

ID_CAMPEONATO is the field I would like to get inside the function.

Thank you in advance.

Daniil
Oct 22, 2013, 10:04 AM
It is how you can access a record:

<TriggerClick Handler="alert(this.ownerCt.editingPlugin.activeRecord);" />

jamesand
Oct 22, 2013, 10:33 AM

Daniil
Oct 22, 2013, 12:11 PM
I tested with a CellEditing.

With RowEditing please use:

this.ownerCt.editingPlugin.context.record

Meanwhile, it works with a CellEditing as well.

jamesand
Oct 22, 2013, 1:12 PM
I tested with a CellEditing.

With RowEditing please use:

this.ownerCt.editingPlugin.context.record

Meanwhile, it works with a CellEditing as well.

Thank you Daniil, it works perfectly.