<?php

namespace PHPMaker2021\rdigital21;

// Set up and run Grid object
$Grid = Container("NilaiP5Grid");
$Grid->run();
?>
<?php if (!$Grid->isExport()) { ?>
<script>
var currentForm, currentPageID;
var fnilai_p5grid;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    fnilai_p5grid = new ew.Form("fnilai_p5grid", "grid");
    fnilai_p5grid.formKeyCountName = '<?= $Grid->FormKeyCountName ?>';

    // Add fields
    var currentTable = <?= JsonEncode(GetClientVar("tables", "nilai_p5")) ?>,
        fields = currentTable.fields;
    if (!ew.vars.tables.nilai_p5)
        ew.vars.tables.nilai_p5 = currentTable;
    fnilai_p5grid.addFields([
        ["kelas", [fields.kelas.visible && fields.kelas.required ? ew.Validators.required(fields.kelas.caption) : null], fields.kelas.isInvalid],
        ["nis", [fields.nis.visible && fields.nis.required ? ew.Validators.required(fields.nis.caption) : null], fields.nis.isInvalid],
        ["proyek", [fields.proyek.visible && fields.proyek.required ? ew.Validators.required(fields.proyek.caption) : null], fields.proyek.isInvalid],
        ["dimensi", [fields.dimensi.visible && fields.dimensi.required ? ew.Validators.required(fields.dimensi.caption) : null], fields.dimensi.isInvalid],
        ["sub_elemen", [fields.sub_elemen.visible && fields.sub_elemen.required ? ew.Validators.required(fields.sub_elemen.caption) : null], fields.sub_elemen.isInvalid],
        ["nilai", [fields.nilai.visible && fields.nilai.required ? ew.Validators.required(fields.nilai.caption) : null], fields.nilai.isInvalid],
        ["tapel_id", [fields.tapel_id.visible && fields.tapel_id.required ? ew.Validators.required(fields.tapel_id.caption) : null], fields.tapel_id.isInvalid]
    ]);

    // Set invalid fields
    $(function() {
        var f = fnilai_p5grid,
            fobj = f.getForm(),
            $fobj = $(fobj),
            $k = $fobj.find("#" + f.formKeyCountName), // Get key_count
            rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1,
            startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
        for (var i = startcnt; i <= rowcnt; i++) {
            var rowIndex = ($k[0]) ? String(i) : "";
            f.setInvalid(rowIndex);
        }
    });

    // Validate form
    fnilai_p5grid.validate = function () {
        if (!this.validateRequired)
            return true; // Ignore validation
        var fobj = this.getForm(),
            $fobj = $(fobj);
        if ($fobj.find("#confirm").val() == "confirm")
            return true;
        var addcnt = 0,
            $k = $fobj.find("#" + this.formKeyCountName), // Get key_count
            rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1,
            startcnt = (rowcnt == 0) ? 0 : 1, // Check rowcnt == 0 => Inline-Add
            gridinsert = ["insert", "gridinsert"].includes($fobj.find("#action").val()) && $k[0];
        for (var i = startcnt; i <= rowcnt; i++) {
            var rowIndex = ($k[0]) ? String(i) : "";
            $fobj.data("rowindex", rowIndex);
            var checkrow = (gridinsert) ? !this.emptyRow(rowIndex) : true;
            if (checkrow) {
                addcnt++;

            // Validate fields
            if (!this.validateFields(rowIndex))
                return false;

            // Call Form_CustomValidate event
            if (!this.customValidate(fobj)) {
                this.focus();
                return false;
            }
            } // End Grid Add checking
        }
        return true;
    }

    // Check empty row
    fnilai_p5grid.emptyRow = function (rowIndex) {
        var fobj = this.getForm();
        if (ew.valueChanged(fobj, rowIndex, "kelas", false))
            return false;
        if (ew.valueChanged(fobj, rowIndex, "nis", false))
            return false;
        if (ew.valueChanged(fobj, rowIndex, "proyek", false))
            return false;
        if (ew.valueChanged(fobj, rowIndex, "dimensi", false))
            return false;
        if (ew.valueChanged(fobj, rowIndex, "sub_elemen", false))
            return false;
        if (ew.valueChanged(fobj, rowIndex, "nilai", false))
            return false;
        if (ew.valueChanged(fobj, rowIndex, "tapel_id", false))
            return false;
        return true;
    }

    // Form_CustomValidate
    fnilai_p5grid.customValidate = function(fobj) { // DO NOT CHANGE THIS LINE!
        // Your custom validation code here, return false if invalid.
        return true;
    }

    // Use JavaScript validation or not
    fnilai_p5grid.validateRequired = <?= Config("CLIENT_VALIDATE") ? "true" : "false" ?>;

    // Dynamic selection lists
    fnilai_p5grid.lists.kelas = <?= $Grid->kelas->toClientList($Grid) ?>;
    fnilai_p5grid.lists.nis = <?= $Grid->nis->toClientList($Grid) ?>;
    fnilai_p5grid.lists.nilai = <?= $Grid->nilai->toClientList($Grid) ?>;
    loadjs.done("fnilai_p5grid");
});
</script>
<?php } ?>
<?php
$Grid->renderOtherOptions();
?>
<?php if ($Grid->TotalRecords > 0 || $Grid->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($Grid->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> nilai_p5">
<?php if ($Grid->ShowOtherOptions) { ?>
<div class="card-header ew-grid-upper-panel">
<?php $Grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<div id="fnilai_p5grid" class="ew-form ew-list-form form-inline">
<div id="gmp_nilai_p5" class="<?= ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table id="tbl_nilai_p5grid" class="table ew-table"><!-- .ew-table -->
<thead>
    <tr class="ew-table-header">
<?php
// Header row
$Grid->RowType = ROWTYPE_HEADER;

// Render list options
$Grid->renderListOptions();

// Render list options (header, left)
$Grid->ListOptions->render("header", "left");
?>
<?php if ($Grid->kelas->Visible) { // kelas ?>
        <th data-name="kelas" class="<?= $Grid->kelas->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_p5_kelas" class="nilai_p5_kelas"><?= $Grid->renderSort($Grid->kelas) ?></div></th>
<?php } ?>
<?php if ($Grid->nis->Visible) { // nis ?>
        <th data-name="nis" class="<?= $Grid->nis->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_p5_nis" class="nilai_p5_nis"><?= $Grid->renderSort($Grid->nis) ?></div></th>
<?php } ?>
<?php if ($Grid->proyek->Visible) { // proyek ?>
        <th data-name="proyek" class="<?= $Grid->proyek->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_p5_proyek" class="nilai_p5_proyek"><?= $Grid->renderSort($Grid->proyek) ?></div></th>
<?php } ?>
<?php if ($Grid->dimensi->Visible) { // dimensi ?>
        <th data-name="dimensi" class="<?= $Grid->dimensi->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_p5_dimensi" class="nilai_p5_dimensi"><?= $Grid->renderSort($Grid->dimensi) ?></div></th>
<?php } ?>
<?php if ($Grid->sub_elemen->Visible) { // sub_elemen ?>
        <th data-name="sub_elemen" class="<?= $Grid->sub_elemen->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_p5_sub_elemen" class="nilai_p5_sub_elemen"><?= $Grid->renderSort($Grid->sub_elemen) ?></div></th>
<?php } ?>
<?php if ($Grid->nilai->Visible) { // nilai ?>
        <th data-name="nilai" class="<?= $Grid->nilai->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_p5_nilai" class="nilai_p5_nilai"><?= $Grid->renderSort($Grid->nilai) ?></div></th>
<?php } ?>
<?php if ($Grid->tapel_id->Visible) { // tapel_id ?>
        <th data-name="tapel_id" class="<?= $Grid->tapel_id->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_p5_tapel_id" class="nilai_p5_tapel_id"><?= $Grid->renderSort($Grid->tapel_id) ?></div></th>
<?php } ?>
<?php
// Render list options (header, right)
$Grid->ListOptions->render("header", "right");
?>
    </tr>
</thead>
<tbody>
<?php
$Grid->StartRecord = 1;
$Grid->StopRecord = $Grid->TotalRecords; // Show all records

// Restore number of post back records
if ($CurrentForm && ($Grid->isConfirm() || $Grid->EventCancelled)) {
    $CurrentForm->Index = -1;
    if ($CurrentForm->hasValue($Grid->FormKeyCountName) && ($Grid->isGridAdd() || $Grid->isGridEdit() || $Grid->isConfirm())) {
        $Grid->KeyCount = $CurrentForm->getValue($Grid->FormKeyCountName);
        $Grid->StopRecord = $Grid->StartRecord + $Grid->KeyCount - 1;
    }
}
$Grid->RecordCount = $Grid->StartRecord - 1;
if ($Grid->Recordset && !$Grid->Recordset->EOF) {
    // Nothing to do
} elseif (!$Grid->AllowAddDeleteRow && $Grid->StopRecord == 0) {
    $Grid->StopRecord = $Grid->GridAddRowCount;
}

// Initialize aggregate
$Grid->RowType = ROWTYPE_AGGREGATEINIT;
$Grid->resetAttributes();
$Grid->renderRow();
if ($Grid->isGridAdd())
    $Grid->RowIndex = 0;
if ($Grid->isGridEdit())
    $Grid->RowIndex = 0;
while ($Grid->RecordCount < $Grid->StopRecord) {
    $Grid->RecordCount++;
    if ($Grid->RecordCount >= $Grid->StartRecord) {
        $Grid->RowCount++;
        if ($Grid->isGridAdd() || $Grid->isGridEdit() || $Grid->isConfirm()) {
            $Grid->RowIndex++;
            $CurrentForm->Index = $Grid->RowIndex;
            if ($CurrentForm->hasValue($Grid->FormActionName) && ($Grid->isConfirm() || $Grid->EventCancelled)) {
                $Grid->RowAction = strval($CurrentForm->getValue($Grid->FormActionName));
            } elseif ($Grid->isGridAdd()) {
                $Grid->RowAction = "insert";
            } else {
                $Grid->RowAction = "";
            }
        }

        // Set up key count
        $Grid->KeyCount = $Grid->RowIndex;

        // Init row class and style
        $Grid->resetAttributes();
        $Grid->CssClass = "";
        if ($Grid->isGridAdd()) {
            if ($Grid->CurrentMode == "copy") {
                $Grid->loadRowValues($Grid->Recordset); // Load row values
                $Grid->OldKey = $Grid->getKey(true); // Get from CurrentValue
            } else {
                $Grid->loadRowValues(); // Load default values
                $Grid->OldKey = "";
            }
        } else {
            $Grid->loadRowValues($Grid->Recordset); // Load row values
            $Grid->OldKey = $Grid->getKey(true); // Get from CurrentValue
        }
        $Grid->setKey($Grid->OldKey);
        $Grid->RowType = ROWTYPE_VIEW; // Render view
        if ($Grid->isGridAdd()) { // Grid add
            $Grid->RowType = ROWTYPE_ADD; // Render add
        }
        if ($Grid->isGridAdd() && $Grid->EventCancelled && !$CurrentForm->hasValue("k_blankrow")) { // Insert failed
            $Grid->restoreCurrentRowFormValues($Grid->RowIndex); // Restore form values
        }
        if ($Grid->isGridEdit()) { // Grid edit
            if ($Grid->EventCancelled) {
                $Grid->restoreCurrentRowFormValues($Grid->RowIndex); // Restore form values
            }
            if ($Grid->RowAction == "insert") {
                $Grid->RowType = ROWTYPE_ADD; // Render add
            } else {
                $Grid->RowType = ROWTYPE_EDIT; // Render edit
            }
        }
        if ($Grid->isGridEdit() && ($Grid->RowType == ROWTYPE_EDIT || $Grid->RowType == ROWTYPE_ADD) && $Grid->EventCancelled) { // Update failed
            $Grid->restoreCurrentRowFormValues($Grid->RowIndex); // Restore form values
        }
        if ($Grid->RowType == ROWTYPE_EDIT) { // Edit row
            $Grid->EditRowCount++;
        }
        if ($Grid->isConfirm()) { // Confirm row
            $Grid->restoreCurrentRowFormValues($Grid->RowIndex); // Restore form values
        }

        // Set up row id / data-rowindex
        $Grid->RowAttrs->merge(["data-rowindex" => $Grid->RowCount, "id" => "r" . $Grid->RowCount . "_nilai_p5", "data-rowtype" => $Grid->RowType]);

        // Render row
        $Grid->renderRow();

        // Render list options
        $Grid->renderListOptions();

        // Skip delete row / empty row for confirm page
        if ($Grid->RowAction != "delete" && $Grid->RowAction != "insertdelete" && !($Grid->RowAction == "insert" && $Grid->isConfirm() && $Grid->emptyRow())) {
?>
    <tr <?= $Grid->rowAttributes() ?>>
<?php
// Render list options (body, left)
$Grid->ListOptions->render("body", "left", $Grid->RowCount);
?>
    <?php if ($Grid->kelas->Visible) { // kelas ?>
        <td data-name="kelas" <?= $Grid->kelas->cellAttributes() ?>>
<?php if ($Grid->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($Grid->kelas->getSessionValue() != "") { ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_kelas" class="form-group">
<span<?= $Grid->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->kelas->getDisplayValue($Grid->kelas->ViewValue))) ?>"></span>
</span>
<input type="hidden" id="x<?= $Grid->RowIndex ?>_kelas" name="x<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->CurrentValue) ?>" data-hidden="1">
<?php } else { ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_kelas" class="form-group">
    <select
        id="x<?= $Grid->RowIndex ?>_kelas"
        name="x<?= $Grid->RowIndex ?>_kelas"
        class="form-control ew-select<?= $Grid->kelas->isInvalidClass() ?>"
        data-select2-id="nilai_p5_x<?= $Grid->RowIndex ?>_kelas"
        data-table="nilai_p5"
        data-field="x_kelas"
        data-value-separator="<?= $Grid->kelas->displayValueSeparatorAttribute() ?>"
        <?= $Grid->kelas->editAttributes() ?>>
        <?= $Grid->kelas->selectOptionListHtml("x{$Grid->RowIndex}_kelas") ?>
    </select>
    <div class="invalid-feedback"><?= $Grid->kelas->getErrorMessage() ?></div>
<?= $Grid->kelas->Lookup->getParamTag($Grid, "p_x" . $Grid->RowIndex . "_kelas") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='nilai_p5_x<?= $Grid->RowIndex ?>_kelas']"),
        options = { name: "x<?= $Grid->RowIndex ?>_kelas", selectId: "nilai_p5_x<?= $Grid->RowIndex ?>_kelas", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.nilai_p5.fields.kelas.selectOptions);
    ew.createSelect(options);
});
</script>
</span>
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_kelas" data-hidden="1" name="o<?= $Grid->RowIndex ?>_kelas" id="o<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->OldValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_kelas" class="form-group">
<span<?= $Grid->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->kelas->getDisplayValue($Grid->kelas->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_kelas" data-hidden="1" name="x<?= $Grid->RowIndex ?>_kelas" id="x<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->CurrentValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_kelas">
<span<?= $Grid->kelas->viewAttributes() ?>>
<?= $Grid->kelas->getViewValue() ?></span>
</span>
<?php if ($Grid->isConfirm()) { ?>
<input type="hidden" data-table="nilai_p5" data-field="x_kelas" data-hidden="1" name="fnilai_p5grid$x<?= $Grid->RowIndex ?>_kelas" id="fnilai_p5grid$x<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->FormValue) ?>">
<input type="hidden" data-table="nilai_p5" data-field="x_kelas" data-hidden="1" name="fnilai_p5grid$o<?= $Grid->RowIndex ?>_kelas" id="fnilai_p5grid$o<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Grid->nis->Visible) { // nis ?>
        <td data-name="nis" <?= $Grid->nis->cellAttributes() ?>>
<?php if ($Grid->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($Grid->nis->getSessionValue() != "") { ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_nis" class="form-group">
<span<?= $Grid->nis->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->nis->getDisplayValue($Grid->nis->ViewValue))) ?>"></span>
</span>
<input type="hidden" id="x<?= $Grid->RowIndex ?>_nis" name="x<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->CurrentValue) ?>" data-hidden="1">
<?php } else { ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_nis" class="form-group">
<?php
$onchange = $Grid->nis->EditAttrs->prepend("onchange", "");
$onchange = ($onchange) ? ' onchange="' . JsEncode($onchange) . '"' : '';
$Grid->nis->EditAttrs["onchange"] = "";
?>
<span id="as_x<?= $Grid->RowIndex ?>_nis" class="ew-auto-suggest">
    <input type="<?= $Grid->nis->getInputTextType() ?>" class="form-control" name="sv_x<?= $Grid->RowIndex ?>_nis" id="sv_x<?= $Grid->RowIndex ?>_nis" value="<?= RemoveHtml($Grid->nis->EditValue) ?>" size="30" maxlength="255"<?= $Grid->nis->editAttributes() ?>>
</span>
<input type="hidden" is="selection-list" class="form-control" data-table="nilai_p5" data-field="x_nis" data-input="sv_x<?= $Grid->RowIndex ?>_nis" data-value-separator="<?= $Grid->nis->displayValueSeparatorAttribute() ?>" name="x<?= $Grid->RowIndex ?>_nis" id="x<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->CurrentValue) ?>"<?= $onchange ?>>
<div class="invalid-feedback"><?= $Grid->nis->getErrorMessage() ?></div>
<script>
loadjs.ready(["fnilai_p5grid"], function() {
    fnilai_p5grid.createAutoSuggest(Object.assign({"id":"x<?= $Grid->RowIndex ?>_nis","forceSelect":false}, ew.vars.tables.nilai_p5.fields.nis.autoSuggestOptions));
});
</script>
<?= $Grid->nis->Lookup->getParamTag($Grid, "p_x" . $Grid->RowIndex . "_nis") ?>
</span>
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_nis" data-hidden="1" name="o<?= $Grid->RowIndex ?>_nis" id="o<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->OldValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_nis" class="form-group">
<span<?= $Grid->nis->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->nis->getDisplayValue($Grid->nis->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_nis" data-hidden="1" name="x<?= $Grid->RowIndex ?>_nis" id="x<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->CurrentValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_nis">
<span<?= $Grid->nis->viewAttributes() ?>>
<?= $Grid->nis->getViewValue() ?></span>
</span>
<?php if ($Grid->isConfirm()) { ?>
<input type="hidden" data-table="nilai_p5" data-field="x_nis" data-hidden="1" name="fnilai_p5grid$x<?= $Grid->RowIndex ?>_nis" id="fnilai_p5grid$x<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->FormValue) ?>">
<input type="hidden" data-table="nilai_p5" data-field="x_nis" data-hidden="1" name="fnilai_p5grid$o<?= $Grid->RowIndex ?>_nis" id="fnilai_p5grid$o<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Grid->proyek->Visible) { // proyek ?>
        <td data-name="proyek" <?= $Grid->proyek->cellAttributes() ?>>
<?php if ($Grid->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($Grid->proyek->getSessionValue() != "") { ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_proyek" class="form-group">
<span<?= $Grid->proyek->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->proyek->getDisplayValue($Grid->proyek->ViewValue))) ?>"></span>
</span>
<input type="hidden" id="x<?= $Grid->RowIndex ?>_proyek" name="x<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->CurrentValue) ?>" data-hidden="1">
<?php } else { ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_proyek" class="form-group">
<input type="<?= $Grid->proyek->getInputTextType() ?>" data-table="nilai_p5" data-field="x_proyek" name="x<?= $Grid->RowIndex ?>_proyek" id="x<?= $Grid->RowIndex ?>_proyek" size="30" maxlength="255" value="<?= $Grid->proyek->EditValue ?>"<?= $Grid->proyek->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->proyek->getErrorMessage() ?></div>
</span>
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_proyek" data-hidden="1" name="o<?= $Grid->RowIndex ?>_proyek" id="o<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->OldValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_proyek" class="form-group">
<span<?= $Grid->proyek->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->proyek->getDisplayValue($Grid->proyek->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_proyek" data-hidden="1" name="x<?= $Grid->RowIndex ?>_proyek" id="x<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->CurrentValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_proyek">
<span<?= $Grid->proyek->viewAttributes() ?>>
<?= $Grid->proyek->getViewValue() ?></span>
</span>
<?php if ($Grid->isConfirm()) { ?>
<input type="hidden" data-table="nilai_p5" data-field="x_proyek" data-hidden="1" name="fnilai_p5grid$x<?= $Grid->RowIndex ?>_proyek" id="fnilai_p5grid$x<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->FormValue) ?>">
<input type="hidden" data-table="nilai_p5" data-field="x_proyek" data-hidden="1" name="fnilai_p5grid$o<?= $Grid->RowIndex ?>_proyek" id="fnilai_p5grid$o<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Grid->dimensi->Visible) { // dimensi ?>
        <td data-name="dimensi" <?= $Grid->dimensi->cellAttributes() ?>>
<?php if ($Grid->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_dimensi" class="form-group">
<input type="<?= $Grid->dimensi->getInputTextType() ?>" data-table="nilai_p5" data-field="x_dimensi" name="x<?= $Grid->RowIndex ?>_dimensi" id="x<?= $Grid->RowIndex ?>_dimensi" size="30" maxlength="255" value="<?= $Grid->dimensi->EditValue ?>"<?= $Grid->dimensi->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->dimensi->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_dimensi" data-hidden="1" name="o<?= $Grid->RowIndex ?>_dimensi" id="o<?= $Grid->RowIndex ?>_dimensi" value="<?= HtmlEncode($Grid->dimensi->OldValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_dimensi" class="form-group">
<span<?= $Grid->dimensi->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->dimensi->getDisplayValue($Grid->dimensi->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_dimensi" data-hidden="1" name="x<?= $Grid->RowIndex ?>_dimensi" id="x<?= $Grid->RowIndex ?>_dimensi" value="<?= HtmlEncode($Grid->dimensi->CurrentValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_dimensi">
<span<?= $Grid->dimensi->viewAttributes() ?>>
<?= $Grid->dimensi->getViewValue() ?></span>
</span>
<?php if ($Grid->isConfirm()) { ?>
<input type="hidden" data-table="nilai_p5" data-field="x_dimensi" data-hidden="1" name="fnilai_p5grid$x<?= $Grid->RowIndex ?>_dimensi" id="fnilai_p5grid$x<?= $Grid->RowIndex ?>_dimensi" value="<?= HtmlEncode($Grid->dimensi->FormValue) ?>">
<input type="hidden" data-table="nilai_p5" data-field="x_dimensi" data-hidden="1" name="fnilai_p5grid$o<?= $Grid->RowIndex ?>_dimensi" id="fnilai_p5grid$o<?= $Grid->RowIndex ?>_dimensi" value="<?= HtmlEncode($Grid->dimensi->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Grid->sub_elemen->Visible) { // sub_elemen ?>
        <td data-name="sub_elemen" <?= $Grid->sub_elemen->cellAttributes() ?>>
<?php if ($Grid->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_sub_elemen" class="form-group">
<input type="<?= $Grid->sub_elemen->getInputTextType() ?>" data-table="nilai_p5" data-field="x_sub_elemen" name="x<?= $Grid->RowIndex ?>_sub_elemen" id="x<?= $Grid->RowIndex ?>_sub_elemen" size="30" maxlength="255" value="<?= $Grid->sub_elemen->EditValue ?>"<?= $Grid->sub_elemen->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->sub_elemen->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_sub_elemen" data-hidden="1" name="o<?= $Grid->RowIndex ?>_sub_elemen" id="o<?= $Grid->RowIndex ?>_sub_elemen" value="<?= HtmlEncode($Grid->sub_elemen->OldValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_sub_elemen" class="form-group">
<span<?= $Grid->sub_elemen->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->sub_elemen->getDisplayValue($Grid->sub_elemen->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_sub_elemen" data-hidden="1" name="x<?= $Grid->RowIndex ?>_sub_elemen" id="x<?= $Grid->RowIndex ?>_sub_elemen" value="<?= HtmlEncode($Grid->sub_elemen->CurrentValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_sub_elemen">
<span<?= $Grid->sub_elemen->viewAttributes() ?>>
<?= $Grid->sub_elemen->getViewValue() ?></span>
</span>
<?php if ($Grid->isConfirm()) { ?>
<input type="hidden" data-table="nilai_p5" data-field="x_sub_elemen" data-hidden="1" name="fnilai_p5grid$x<?= $Grid->RowIndex ?>_sub_elemen" id="fnilai_p5grid$x<?= $Grid->RowIndex ?>_sub_elemen" value="<?= HtmlEncode($Grid->sub_elemen->FormValue) ?>">
<input type="hidden" data-table="nilai_p5" data-field="x_sub_elemen" data-hidden="1" name="fnilai_p5grid$o<?= $Grid->RowIndex ?>_sub_elemen" id="fnilai_p5grid$o<?= $Grid->RowIndex ?>_sub_elemen" value="<?= HtmlEncode($Grid->sub_elemen->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Grid->nilai->Visible) { // nilai ?>
        <td data-name="nilai" <?= $Grid->nilai->cellAttributes() ?>>
<?php if ($Grid->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_nilai" class="form-group">
<template id="tp_x<?= $Grid->RowIndex ?>_nilai">
    <div class="custom-control custom-radio">
        <input type="radio" class="custom-control-input" data-table="nilai_p5" data-field="x_nilai" name="x<?= $Grid->RowIndex ?>_nilai" id="x<?= $Grid->RowIndex ?>_nilai"<?= $Grid->nilai->editAttributes() ?>>
        <label class="custom-control-label"></label>
    </div>
</template>
<div id="dsl_x<?= $Grid->RowIndex ?>_nilai" class="ew-item-list"></div>
<input type="hidden"
    is="selection-list"
    id="x<?= $Grid->RowIndex ?>_nilai"
    name="x<?= $Grid->RowIndex ?>_nilai"
    value="<?= HtmlEncode($Grid->nilai->CurrentValue) ?>"
    data-type="select-one"
    data-template="tp_x<?= $Grid->RowIndex ?>_nilai"
    data-target="dsl_x<?= $Grid->RowIndex ?>_nilai"
    data-repeatcolumn="5"
    class="form-control<?= $Grid->nilai->isInvalidClass() ?>"
    data-table="nilai_p5"
    data-field="x_nilai"
    data-value-separator="<?= $Grid->nilai->displayValueSeparatorAttribute() ?>"
    <?= $Grid->nilai->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->nilai->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_nilai" data-hidden="1" name="o<?= $Grid->RowIndex ?>_nilai" id="o<?= $Grid->RowIndex ?>_nilai" value="<?= HtmlEncode($Grid->nilai->OldValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_nilai" class="form-group">
<template id="tp_x<?= $Grid->RowIndex ?>_nilai">
    <div class="custom-control custom-radio">
        <input type="radio" class="custom-control-input" data-table="nilai_p5" data-field="x_nilai" name="x<?= $Grid->RowIndex ?>_nilai" id="x<?= $Grid->RowIndex ?>_nilai"<?= $Grid->nilai->editAttributes() ?>>
        <label class="custom-control-label"></label>
    </div>
</template>
<div id="dsl_x<?= $Grid->RowIndex ?>_nilai" class="ew-item-list"></div>
<input type="hidden"
    is="selection-list"
    id="x<?= $Grid->RowIndex ?>_nilai"
    name="x<?= $Grid->RowIndex ?>_nilai"
    value="<?= HtmlEncode($Grid->nilai->CurrentValue) ?>"
    data-type="select-one"
    data-template="tp_x<?= $Grid->RowIndex ?>_nilai"
    data-target="dsl_x<?= $Grid->RowIndex ?>_nilai"
    data-repeatcolumn="5"
    class="form-control<?= $Grid->nilai->isInvalidClass() ?>"
    data-table="nilai_p5"
    data-field="x_nilai"
    data-value-separator="<?= $Grid->nilai->displayValueSeparatorAttribute() ?>"
    <?= $Grid->nilai->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->nilai->getErrorMessage() ?></div>
</span>
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_nilai">
<span<?= $Grid->nilai->viewAttributes() ?>>
<?= $Grid->nilai->getViewValue() ?></span>
</span>
<?php if ($Grid->isConfirm()) { ?>
<input type="hidden" data-table="nilai_p5" data-field="x_nilai" data-hidden="1" name="fnilai_p5grid$x<?= $Grid->RowIndex ?>_nilai" id="fnilai_p5grid$x<?= $Grid->RowIndex ?>_nilai" value="<?= HtmlEncode($Grid->nilai->FormValue) ?>">
<input type="hidden" data-table="nilai_p5" data-field="x_nilai" data-hidden="1" name="fnilai_p5grid$o<?= $Grid->RowIndex ?>_nilai" id="fnilai_p5grid$o<?= $Grid->RowIndex ?>_nilai" value="<?= HtmlEncode($Grid->nilai->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Grid->tapel_id->Visible) { // tapel_id ?>
        <td data-name="tapel_id" <?= $Grid->tapel_id->cellAttributes() ?>>
<?php if ($Grid->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_tapel_id" class="form-group">
<input type="<?= $Grid->tapel_id->getInputTextType() ?>" data-table="nilai_p5" data-field="x_tapel_id" name="x<?= $Grid->RowIndex ?>_tapel_id" id="x<?= $Grid->RowIndex ?>_tapel_id" size="30" maxlength="255" value="<?= $Grid->tapel_id->EditValue ?>"<?= $Grid->tapel_id->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->tapel_id->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_tapel_id" data-hidden="1" name="o<?= $Grid->RowIndex ?>_tapel_id" id="o<?= $Grid->RowIndex ?>_tapel_id" value="<?= HtmlEncode($Grid->tapel_id->OldValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_tapel_id" class="form-group">
<span<?= $Grid->tapel_id->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->tapel_id->getDisplayValue($Grid->tapel_id->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_tapel_id" data-hidden="1" name="x<?= $Grid->RowIndex ?>_tapel_id" id="x<?= $Grid->RowIndex ?>_tapel_id" value="<?= HtmlEncode($Grid->tapel_id->CurrentValue) ?>">
<?php } ?>
<?php if ($Grid->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Grid->RowCount ?>_nilai_p5_tapel_id">
<span<?= $Grid->tapel_id->viewAttributes() ?>>
<?= $Grid->tapel_id->getViewValue() ?></span>
</span>
<?php if ($Grid->isConfirm()) { ?>
<input type="hidden" data-table="nilai_p5" data-field="x_tapel_id" data-hidden="1" name="fnilai_p5grid$x<?= $Grid->RowIndex ?>_tapel_id" id="fnilai_p5grid$x<?= $Grid->RowIndex ?>_tapel_id" value="<?= HtmlEncode($Grid->tapel_id->FormValue) ?>">
<input type="hidden" data-table="nilai_p5" data-field="x_tapel_id" data-hidden="1" name="fnilai_p5grid$o<?= $Grid->RowIndex ?>_tapel_id" id="fnilai_p5grid$o<?= $Grid->RowIndex ?>_tapel_id" value="<?= HtmlEncode($Grid->tapel_id->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
    <?php } ?>
<?php
// Render list options (body, right)
$Grid->ListOptions->render("body", "right", $Grid->RowCount);
?>
    </tr>
<?php if ($Grid->RowType == ROWTYPE_ADD || $Grid->RowType == ROWTYPE_EDIT) { ?>
<script>
loadjs.ready(["fnilai_p5grid","load"], function () {
    fnilai_p5grid.updateLists(<?= $Grid->RowIndex ?>);
});
</script>
<?php } ?>
<?php
    }
    } // End delete row checking
    if (!$Grid->isGridAdd() || $Grid->CurrentMode == "copy")
        if (!$Grid->Recordset->EOF) {
            $Grid->Recordset->moveNext();
        }
}
?>
<?php
    if ($Grid->CurrentMode == "add" || $Grid->CurrentMode == "copy" || $Grid->CurrentMode == "edit") {
        $Grid->RowIndex = '$rowindex$';
        $Grid->loadRowValues();

        // Set row properties
        $Grid->resetAttributes();
        $Grid->RowAttrs->merge(["data-rowindex" => $Grid->RowIndex, "id" => "r0_nilai_p5", "data-rowtype" => ROWTYPE_ADD]);
        $Grid->RowAttrs->appendClass("ew-template");
        $Grid->RowType = ROWTYPE_ADD;

        // Render row
        $Grid->renderRow();

        // Render list options
        $Grid->renderListOptions();
        $Grid->StartRowCount = 0;
?>
    <tr <?= $Grid->rowAttributes() ?>>
<?php
// Render list options (body, left)
$Grid->ListOptions->render("body", "left", $Grid->RowIndex);
?>
    <?php if ($Grid->kelas->Visible) { // kelas ?>
        <td data-name="kelas">
<?php if (!$Grid->isConfirm()) { ?>
<?php if ($Grid->kelas->getSessionValue() != "") { ?>
<span id="el$rowindex$_nilai_p5_kelas" class="form-group nilai_p5_kelas">
<span<?= $Grid->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->kelas->getDisplayValue($Grid->kelas->ViewValue))) ?>"></span>
</span>
<input type="hidden" id="x<?= $Grid->RowIndex ?>_kelas" name="x<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->CurrentValue) ?>" data-hidden="1">
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_kelas" class="form-group nilai_p5_kelas">
    <select
        id="x<?= $Grid->RowIndex ?>_kelas"
        name="x<?= $Grid->RowIndex ?>_kelas"
        class="form-control ew-select<?= $Grid->kelas->isInvalidClass() ?>"
        data-select2-id="nilai_p5_x<?= $Grid->RowIndex ?>_kelas"
        data-table="nilai_p5"
        data-field="x_kelas"
        data-value-separator="<?= $Grid->kelas->displayValueSeparatorAttribute() ?>"
        <?= $Grid->kelas->editAttributes() ?>>
        <?= $Grid->kelas->selectOptionListHtml("x{$Grid->RowIndex}_kelas") ?>
    </select>
    <div class="invalid-feedback"><?= $Grid->kelas->getErrorMessage() ?></div>
<?= $Grid->kelas->Lookup->getParamTag($Grid, "p_x" . $Grid->RowIndex . "_kelas") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='nilai_p5_x<?= $Grid->RowIndex ?>_kelas']"),
        options = { name: "x<?= $Grid->RowIndex ?>_kelas", selectId: "nilai_p5_x<?= $Grid->RowIndex ?>_kelas", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.nilai_p5.fields.kelas.selectOptions);
    ew.createSelect(options);
});
</script>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_kelas" class="form-group nilai_p5_kelas">
<span<?= $Grid->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->kelas->getDisplayValue($Grid->kelas->ViewValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_kelas" data-hidden="1" name="x<?= $Grid->RowIndex ?>_kelas" id="x<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_kelas" data-hidden="1" name="o<?= $Grid->RowIndex ?>_kelas" id="o<?= $Grid->RowIndex ?>_kelas" value="<?= HtmlEncode($Grid->kelas->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Grid->nis->Visible) { // nis ?>
        <td data-name="nis">
<?php if (!$Grid->isConfirm()) { ?>
<?php if ($Grid->nis->getSessionValue() != "") { ?>
<span id="el$rowindex$_nilai_p5_nis" class="form-group nilai_p5_nis">
<span<?= $Grid->nis->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->nis->getDisplayValue($Grid->nis->ViewValue))) ?>"></span>
</span>
<input type="hidden" id="x<?= $Grid->RowIndex ?>_nis" name="x<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->CurrentValue) ?>" data-hidden="1">
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_nis" class="form-group nilai_p5_nis">
<?php
$onchange = $Grid->nis->EditAttrs->prepend("onchange", "");
$onchange = ($onchange) ? ' onchange="' . JsEncode($onchange) . '"' : '';
$Grid->nis->EditAttrs["onchange"] = "";
?>
<span id="as_x<?= $Grid->RowIndex ?>_nis" class="ew-auto-suggest">
    <input type="<?= $Grid->nis->getInputTextType() ?>" class="form-control" name="sv_x<?= $Grid->RowIndex ?>_nis" id="sv_x<?= $Grid->RowIndex ?>_nis" value="<?= RemoveHtml($Grid->nis->EditValue) ?>" size="30" maxlength="255"<?= $Grid->nis->editAttributes() ?>>
</span>
<input type="hidden" is="selection-list" class="form-control" data-table="nilai_p5" data-field="x_nis" data-input="sv_x<?= $Grid->RowIndex ?>_nis" data-value-separator="<?= $Grid->nis->displayValueSeparatorAttribute() ?>" name="x<?= $Grid->RowIndex ?>_nis" id="x<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->CurrentValue) ?>"<?= $onchange ?>>
<div class="invalid-feedback"><?= $Grid->nis->getErrorMessage() ?></div>
<script>
loadjs.ready(["fnilai_p5grid"], function() {
    fnilai_p5grid.createAutoSuggest(Object.assign({"id":"x<?= $Grid->RowIndex ?>_nis","forceSelect":false}, ew.vars.tables.nilai_p5.fields.nis.autoSuggestOptions));
});
</script>
<?= $Grid->nis->Lookup->getParamTag($Grid, "p_x" . $Grid->RowIndex . "_nis") ?>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_nis" class="form-group nilai_p5_nis">
<span<?= $Grid->nis->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->nis->getDisplayValue($Grid->nis->ViewValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_nis" data-hidden="1" name="x<?= $Grid->RowIndex ?>_nis" id="x<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_nis" data-hidden="1" name="o<?= $Grid->RowIndex ?>_nis" id="o<?= $Grid->RowIndex ?>_nis" value="<?= HtmlEncode($Grid->nis->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Grid->proyek->Visible) { // proyek ?>
        <td data-name="proyek">
<?php if (!$Grid->isConfirm()) { ?>
<?php if ($Grid->proyek->getSessionValue() != "") { ?>
<span id="el$rowindex$_nilai_p5_proyek" class="form-group nilai_p5_proyek">
<span<?= $Grid->proyek->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->proyek->getDisplayValue($Grid->proyek->ViewValue))) ?>"></span>
</span>
<input type="hidden" id="x<?= $Grid->RowIndex ?>_proyek" name="x<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->CurrentValue) ?>" data-hidden="1">
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_proyek" class="form-group nilai_p5_proyek">
<input type="<?= $Grid->proyek->getInputTextType() ?>" data-table="nilai_p5" data-field="x_proyek" name="x<?= $Grid->RowIndex ?>_proyek" id="x<?= $Grid->RowIndex ?>_proyek" size="30" maxlength="255" value="<?= $Grid->proyek->EditValue ?>"<?= $Grid->proyek->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->proyek->getErrorMessage() ?></div>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_proyek" class="form-group nilai_p5_proyek">
<span<?= $Grid->proyek->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->proyek->getDisplayValue($Grid->proyek->ViewValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_proyek" data-hidden="1" name="x<?= $Grid->RowIndex ?>_proyek" id="x<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_proyek" data-hidden="1" name="o<?= $Grid->RowIndex ?>_proyek" id="o<?= $Grid->RowIndex ?>_proyek" value="<?= HtmlEncode($Grid->proyek->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Grid->dimensi->Visible) { // dimensi ?>
        <td data-name="dimensi">
<?php if (!$Grid->isConfirm()) { ?>
<span id="el$rowindex$_nilai_p5_dimensi" class="form-group nilai_p5_dimensi">
<input type="<?= $Grid->dimensi->getInputTextType() ?>" data-table="nilai_p5" data-field="x_dimensi" name="x<?= $Grid->RowIndex ?>_dimensi" id="x<?= $Grid->RowIndex ?>_dimensi" size="30" maxlength="255" value="<?= $Grid->dimensi->EditValue ?>"<?= $Grid->dimensi->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->dimensi->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_dimensi" class="form-group nilai_p5_dimensi">
<span<?= $Grid->dimensi->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->dimensi->getDisplayValue($Grid->dimensi->ViewValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_dimensi" data-hidden="1" name="x<?= $Grid->RowIndex ?>_dimensi" id="x<?= $Grid->RowIndex ?>_dimensi" value="<?= HtmlEncode($Grid->dimensi->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_dimensi" data-hidden="1" name="o<?= $Grid->RowIndex ?>_dimensi" id="o<?= $Grid->RowIndex ?>_dimensi" value="<?= HtmlEncode($Grid->dimensi->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Grid->sub_elemen->Visible) { // sub_elemen ?>
        <td data-name="sub_elemen">
<?php if (!$Grid->isConfirm()) { ?>
<span id="el$rowindex$_nilai_p5_sub_elemen" class="form-group nilai_p5_sub_elemen">
<input type="<?= $Grid->sub_elemen->getInputTextType() ?>" data-table="nilai_p5" data-field="x_sub_elemen" name="x<?= $Grid->RowIndex ?>_sub_elemen" id="x<?= $Grid->RowIndex ?>_sub_elemen" size="30" maxlength="255" value="<?= $Grid->sub_elemen->EditValue ?>"<?= $Grid->sub_elemen->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->sub_elemen->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_sub_elemen" class="form-group nilai_p5_sub_elemen">
<span<?= $Grid->sub_elemen->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->sub_elemen->getDisplayValue($Grid->sub_elemen->ViewValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_sub_elemen" data-hidden="1" name="x<?= $Grid->RowIndex ?>_sub_elemen" id="x<?= $Grid->RowIndex ?>_sub_elemen" value="<?= HtmlEncode($Grid->sub_elemen->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_sub_elemen" data-hidden="1" name="o<?= $Grid->RowIndex ?>_sub_elemen" id="o<?= $Grid->RowIndex ?>_sub_elemen" value="<?= HtmlEncode($Grid->sub_elemen->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Grid->nilai->Visible) { // nilai ?>
        <td data-name="nilai">
<?php if (!$Grid->isConfirm()) { ?>
<span id="el$rowindex$_nilai_p5_nilai" class="form-group nilai_p5_nilai">
<template id="tp_x<?= $Grid->RowIndex ?>_nilai">
    <div class="custom-control custom-radio">
        <input type="radio" class="custom-control-input" data-table="nilai_p5" data-field="x_nilai" name="x<?= $Grid->RowIndex ?>_nilai" id="x<?= $Grid->RowIndex ?>_nilai"<?= $Grid->nilai->editAttributes() ?>>
        <label class="custom-control-label"></label>
    </div>
</template>
<div id="dsl_x<?= $Grid->RowIndex ?>_nilai" class="ew-item-list"></div>
<input type="hidden"
    is="selection-list"
    id="x<?= $Grid->RowIndex ?>_nilai"
    name="x<?= $Grid->RowIndex ?>_nilai"
    value="<?= HtmlEncode($Grid->nilai->CurrentValue) ?>"
    data-type="select-one"
    data-template="tp_x<?= $Grid->RowIndex ?>_nilai"
    data-target="dsl_x<?= $Grid->RowIndex ?>_nilai"
    data-repeatcolumn="5"
    class="form-control<?= $Grid->nilai->isInvalidClass() ?>"
    data-table="nilai_p5"
    data-field="x_nilai"
    data-value-separator="<?= $Grid->nilai->displayValueSeparatorAttribute() ?>"
    <?= $Grid->nilai->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->nilai->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_nilai" class="form-group nilai_p5_nilai">
<span<?= $Grid->nilai->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->nilai->getDisplayValue($Grid->nilai->ViewValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_nilai" data-hidden="1" name="x<?= $Grid->RowIndex ?>_nilai" id="x<?= $Grid->RowIndex ?>_nilai" value="<?= HtmlEncode($Grid->nilai->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_nilai" data-hidden="1" name="o<?= $Grid->RowIndex ?>_nilai" id="o<?= $Grid->RowIndex ?>_nilai" value="<?= HtmlEncode($Grid->nilai->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Grid->tapel_id->Visible) { // tapel_id ?>
        <td data-name="tapel_id">
<?php if (!$Grid->isConfirm()) { ?>
<span id="el$rowindex$_nilai_p5_tapel_id" class="form-group nilai_p5_tapel_id">
<input type="<?= $Grid->tapel_id->getInputTextType() ?>" data-table="nilai_p5" data-field="x_tapel_id" name="x<?= $Grid->RowIndex ?>_tapel_id" id="x<?= $Grid->RowIndex ?>_tapel_id" size="30" maxlength="255" value="<?= $Grid->tapel_id->EditValue ?>"<?= $Grid->tapel_id->editAttributes() ?>>
<div class="invalid-feedback"><?= $Grid->tapel_id->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el$rowindex$_nilai_p5_tapel_id" class="form-group nilai_p5_tapel_id">
<span<?= $Grid->tapel_id->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Grid->tapel_id->getDisplayValue($Grid->tapel_id->ViewValue))) ?>"></span>
</span>
<input type="hidden" data-table="nilai_p5" data-field="x_tapel_id" data-hidden="1" name="x<?= $Grid->RowIndex ?>_tapel_id" id="x<?= $Grid->RowIndex ?>_tapel_id" value="<?= HtmlEncode($Grid->tapel_id->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="nilai_p5" data-field="x_tapel_id" data-hidden="1" name="o<?= $Grid->RowIndex ?>_tapel_id" id="o<?= $Grid->RowIndex ?>_tapel_id" value="<?= HtmlEncode($Grid->tapel_id->OldValue) ?>">
</td>
    <?php } ?>
<?php
// Render list options (body, right)
$Grid->ListOptions->render("body", "right", $Grid->RowIndex);
?>
<script>
loadjs.ready(["fnilai_p5grid","load"], function() {
    fnilai_p5grid.updateLists(<?= $Grid->RowIndex ?>);
});
</script>
    </tr>
<?php
    }
?>
</tbody>
</table><!-- /.ew-table -->
</div><!-- /.ew-grid-middle-panel -->
<?php if ($Grid->CurrentMode == "add" || $Grid->CurrentMode == "copy") { ?>
<input type="hidden" name="<?= $Grid->FormKeyCountName ?>" id="<?= $Grid->FormKeyCountName ?>" value="<?= $Grid->KeyCount ?>">
<?= $Grid->MultiSelectKey ?>
<?php } ?>
<?php if ($Grid->CurrentMode == "edit") { ?>
<input type="hidden" name="<?= $Grid->FormKeyCountName ?>" id="<?= $Grid->FormKeyCountName ?>" value="<?= $Grid->KeyCount ?>">
<?= $Grid->MultiSelectKey ?>
<?php } ?>
<?php if ($Grid->CurrentMode == "") { ?>
<input type="hidden" name="action" id="action" value="">
<?php } ?>
<input type="hidden" name="detailpage" value="fnilai_p5grid">
</div><!-- /.ew-list-form -->
<?php
// Close recordset
if ($Grid->Recordset) {
    $Grid->Recordset->close();
}
?>
<?php if ($Grid->ShowOtherOptions) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php $Grid->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($Grid->TotalRecords == 0 && !$Grid->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $Grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php if (!$Grid->isExport()) { ?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("nilai_p5");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
<?php } ?>
