Get KoolPHP UI with 30% OFF!

Grid border

Jayme
Hello,
I do not know why my KoolGrid has not the bottom border on the right place.
It seems the bottom border is at the top of the last row.
Thank you very much.
Jayme Jeffman
Posted Nov 29, 2016 Kool
Peter
Hi Jayme,
Could you please include an image.
Regards,
Peter
Posted Nov 30, 2016 Kool
Jayme
Hi Peter,
How can I upload an image? When I click on the camera image nothing happens.
Best regards.
Jayme Jeffman
Posted Nov 30, 2016 Kool
Jayme
Hi Peter,
I have not succeeded on upload any image to this forum, so I have decided to show the images creating an internet link to them:
1. When the page is loaded :
http://www.thofehrn.com.br/koolgrid/before_pressing_atualizar.png
2. After pressing the button "Atualizar":
http://www.thofehrn.com.br/koolgrid/after_pressing_atualizar.png
Even the links above can not be clicked on but if you copy them to a new browser window or tab they will work perfectly. I think this forum has some problems on the use of uploading images and rendering external links.
Best regards.
Posted Dec 1, 2016 , edited Dec 1, 2016 Kool -
Peter
Before:

After:

We have fixed the image uploader for IE. Sorry for this inconvenience.
So for the issue of grid, you mean that it does not show correctly for the first load, but work after click Update?
Posted Dec 2, 2016 Kool
Jayme
Hi Peter,
Yes, that is how the application is working now.
The grid code on my application is as below:
<cut>
  $ds = new OracleDatasource($conn);
  if(isset($_REQUEST['ptomed']))  $ptomed  = $_REQUEST['ptomed']  ;
  if(isset($_REQUEST['iniper']))  $iniper  = $_REQUEST['iniper']  ;
  if(isset($_REQUEST['fimper']))
    $fimper  = $_REQUEST['fimper']  ;
  else
    $fimper = date("Y-m-d");
  if(isset($_REQUEST['operel']))  $operel  = $_REQUEST['operel']  ;
  if(isset($_REQUEST['duramin'])) $duramin = $_REQUEST['duramin'] ;
  $query = "SELECT flt.INICIO
                  ,flt.TERMINO
                  ,TO_CHAR( flt.INICIO, 'dd/mm/yyyy hh24:mi:ss') AS INI
                  ,TO_CHAR( flt.TERMINO, 'dd/mm/yyyy hh24:mi:ss') AS FIM
                  ,CASE
                     WHEN puc.NOME IS NULL THEN
                       ptm.IDENTIFICACAO
                     ELSE
                       ptm.IDENTIFICACAO || ' - ' || puc.NOME
                   END AS IDENTIFICACAO
                  ,mtr.SERIAL
                  ,ROUND((flt.TERMINO - flt.INICIO) * 60 * 24, 1 ) AS DURACAO
                  ,SUBSTR(TO_CHAR(NUMTODSINTERVAL (flt.TERMINO - flt.INICIO, 'DAY')),INSTR(TO_CHAR(NUMTODSINTERVAL (flt.TERMINO - flt.INICIO, 'DAY')),':')-2,8) AS MINUTOS
            FROM S4MED_FALTAENERG flt
            INNER JOIN S4MED_MEDICAO  mdc ON mdc.MEDICAO  = flt.MEDICAO
            INNER JOIN S4MED_PONTOMED ptm ON ptm.PONTOMED = mdc.PONTOMED
            LEFT  JOIN S4MED_UC       puc ON puc.PONTOMED = ptm.PONTOMED
            INNER JOIN S4MED_MEDIDOR  mtr ON mtr.MEDIDOR  = mdc.MEDIDOR
            WHERE flt.TERMINO <= TO_DATE('".$fimper."','yyyy-mm-dd')";
  if(!empty($iniper))
    $query .= " AND flt.INICIO >= TO_DATE('".$iniper."','yyyy-mm-dd')";
  if( $ptomed > 0 )
    $query .= " AND ptm.PONTOMED = ". $ptomed;
  if( $duramin >= 0 && $operel >= 0 ){
    $query .= " AND ROUND((flt.TERMINO - flt.INICIO) * 60 * 24, 1 ) ";
    if( $operel == 0 )
      $query .= "> ";
    else if( $operel == 1 )
      $query .= "= ";
    else if( $operel == 2 )
      $query .= "< ";
    $query .= $duramin;
  }
  $query .= " ORDER BY flt.INICIO DESC";
  $ds->SelectCommand = $query;
  $kgFalta = new KoolGrid('kgFalta');
  $kgocoevt->scriptFolder = $KoolControlsFolder."/KoolGrid";
  $kgFalta->DataSource = $ds;
  $kgFalta->AjaxEnabled = true;
  $kgFalta->AjaxLoadingImage =  $KoolControlsFolder."/KoolAjax/loading/9.gif";
  $kgFalta->AllowScrolling = true;
  $kgFalta->AllowResizing = true;
  $kgFalta->AllowSelecting = true;
  $kgFalta->RowAlternative = true;
  $kgFalta->Width  = "630px";
  $kgFalta->Height = "430px";
  $kgFalta->ShowStatus = false;
  $kgFalta->styleFolder = "default";
  $kgFalta->CharSet="UTF-8";
  //$kgFalta->ClientSettings->ClientEvents["OnRowSelect"] = "ocoEvtSelect";
  //$kgFalta->ClientSettings->ClientEvents["OnRowDeselect"] = "ocoEvtDeselect";
  //$kgFalta->ClientSettings->ClientEvents["OnGridCommit"] = "ocoEvtCommit";
  //$kgFalta->ClientSettings->ClientEvents["OnLoad"] = "faltasLoad";
  $col = new GridBoundColumn(); //0
  $col->HeaderText         = "In&iacute;cio";
  $col->HeaderStyle->Align = "center";
  $col->DataField          = "INI";
  $col->Align              = 'center';
  $col->Width              = '130px';
  $kgFalta->MasterTable->AddColumn($col);
  $col = new GridBoundColumn(); //0
  $col->HeaderText         = "T&eacute;rmino";
  $col->HeaderStyle->Align = "center";
  $col->DataField          = "FIM";
  $col->Align              = 'center';
  $col->Width              = '130px';
  $kgFalta->MasterTable->AddColumn($col);
  $col = new GridBoundColumn(); //0
  $col->HeaderText         = "Dura&ccedil;&atilde;o";
  $col->HeaderStyle->Align = "center";
  $col->DataField          = "MINUTOS";
  $col->Align              = 'center';
  $col->Width              = '80px';
  $kgFalta->MasterTable->AddColumn($col);
  $col = new GridBoundColumn(); //0
  $col->HeaderText         = "Ponto de Medi&ccedil;&atilde;o";
  $col->HeaderStyle->Align = "center";
  $col->DataField          = "IDENTIFICACAO";
  $col->Align              = 'left';
  $col->Width              = '180px';
  $kgFalta->MasterTable->AddColumn($col);
  $col = new GridBoundColumn(); //0
  $col->HeaderText         = "Medidor";
  $col->HeaderStyle->Align = "center";
  $col->DataField          = "SERIAL";
  $col->Align              = 'center';
  $col->Width              = '80px';
  $kgFalta->MasterTable->AddColumn($col);
  $kgFalta->Process();
<cut>
          <div id="faltaene" style="display: none;">
            <h2 style="text-align: center;">Faltas de Energia</h2>
            <div style="text-align: center;">
<cut>
              <?php echo $kgFalta->Render(); ?>
            </div>
          </div>

Best regards.
Jayme Jeffman
Posted Dec 2, 2016 Kool
Peter
I think the problem is that Grid is started in the "display:none" div, so at the first load, it is not able to calculate the height correctly. Is that possible that you can remove the "display:none" at the first place?
Posted Dec 3, 2016 Kool -
Jayme
Hi Peter,
I did as you suggested and now it is working perfectly.
Thank you very much.
Best regards.
Jayme Jeffman
Posted Dec 4, 2016 Kool