EasyUI Forum
April 17, 2024, 08:02:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Display documents in datagrid loaded with $ _FILES statement  (Read 5297 times)
jsanchez
Newbie
*
Posts: 3


View Profile
« on: July 25, 2017, 02:19:24 PM »

Hello, I have a question with the datagrid. I need it on the screen of the datagrid when deploying a file loaded with $ _FILES I get the display of the file or document that loads to display it in a datagrid.

            <tr>
                <th data-options="field:'nombreConvenioFormRepositorio'" width="40%">Nombre del Convenio</th>
                <th data-options="field:'nombreTipoRepositorioFormRepositorio'" width="20%">Tipo Repositorio</th>
                <th data-options="field:'nombreFormRepositorio'" width="40%">Nombre del Repositorio</th>
               <th data-options="field:'documentoRepositorioFormRepositorio'" width="10%">Documento</th>                 
            </tr>

The variable "RepositoryFormRepository" is a path for viewing a file. What I need what instruction I need or what I should do.

thanks for your help
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 25, 2017, 05:22:07 PM »

Use the 'formatter' function to embed an <iframe> to display your file's content. Please try this code.
Code:
<th data-options="field:'documentoRepositorioFormRepositorio',width:250,
    formatter: function(value,row){
      var url = ...;
      var s = '<iframe src=\''+url+'\' style=\'width:100%;height:100px\'></iframe>';
      return s;
    }"> Documento </th>
Logged
jsanchez
Newbie
*
Posts: 3


View Profile
« Reply #2 on: July 27, 2017, 02:46:59 PM »

Thank you
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!