<?php
namespace PHPMaker2020\hostelmgr20;

// Write header
WriteHeader(FALSE);

// Create page object
if (!isset($activity_grid))
	$activity_grid = new activity_grid();

// Run the page
$activity_grid->run();

// Setup login status
SetupLoginStatus();
SetClientVar("login", LoginStatus());

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$activity_grid->Page_Render();
?>
<?php if (!$activity_grid->isExport()) { ?>
<script>
var factivitygrid, currentPageID;
loadjs.ready("head", function() {

	// Form object
	factivitygrid = new ew.Form("factivitygrid", "grid");
	factivitygrid.formKeyCountName = '<?php echo $activity_grid->FormKeyCountName ?>';

	// Validate form
	factivitygrid.validate = function() {
		if (!this.validateRequired)
			return true; // Ignore validation
		var $ = jQuery, fobj = this.getForm(), $fobj = $(fobj);
		if ($fobj.find("#confirm").val() == "F")
			return true;
		var elm, felm, uelm, addcnt = 0;
		var $k = $fobj.find("#" + this.formKeyCountName); // Get key_count
		var rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1;
		var startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
		var gridinsert = ["insert", "gridinsert"].includes($fobj.find("#action").val()) && $k[0];
		for (var i = startcnt; i <= rowcnt; i++) {
			var infix = ($k[0]) ? String(i) : "";
			$fobj.data("rowindex", infix);
			var checkrow = (gridinsert) ? !this.emptyRow(infix) : true;
			if (checkrow) {
				addcnt++;
			<?php if ($activity_grid->id->Required) { ?>
				elm = this.getElements("x" + infix + "_id");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->id->caption(), $activity_grid->id->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->HotelID->Required) { ?>
				elm = this.getElements("x" + infix + "_HotelID");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->HotelID->caption(), $activity_grid->HotelID->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->RollNo->Required) { ?>
				elm = this.getElements("x" + infix + "_RollNo");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->RollNo->caption(), $activity_grid->RollNo->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Name->Required) { ?>
				elm = this.getElements("x" + infix + "_Name");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Name->caption(), $activity_grid->Name->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Hostel->Required) { ?>
				elm = this.getElements("x" + infix + "_Hostel");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Hostel->caption(), $activity_grid->Hostel->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Floor->Required) { ?>
				elm = this.getElements("x" + infix + "_Floor");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Floor->caption(), $activity_grid->Floor->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Room_No->Required) { ?>
				elm = this.getElements("x" + infix + "_Room_No");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Room_No->caption(), $activity_grid->Room_No->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Health_issue->Required) { ?>
				elm = this.getElements("x" + infix + "_Health_issue[]");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Health_issue->caption(), $activity_grid->Health_issue->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Indiscipline_activity->Required) { ?>
				elm = this.getElements("x" + infix + "_Indiscipline_activity[]");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Indiscipline_activity->caption(), $activity_grid->Indiscipline_activity->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Involvement->Required) { ?>
				elm = this.getElements("x" + infix + "_Involvement");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Involvement->caption(), $activity_grid->Involvement->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_grid->Updated_Date->Required) { ?>
				elm = this.getElements("x" + infix + "_Updated_Date");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_grid->Updated_Date->caption(), $activity_grid->Updated_Date->RequiredErrorMessage)) ?>");
			<?php } ?>

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

	// Check empty row
	factivitygrid.emptyRow = function(infix) {
		var fobj = this._form;
		if (ew.valueChanged(fobj, infix, "HotelID", false)) return false;
		if (ew.valueChanged(fobj, infix, "RollNo", false)) return false;
		if (ew.valueChanged(fobj, infix, "Name", false)) return false;
		if (ew.valueChanged(fobj, infix, "Hostel", false)) return false;
		if (ew.valueChanged(fobj, infix, "Floor", false)) return false;
		if (ew.valueChanged(fobj, infix, "Room_No", false)) return false;
		if (ew.valueChanged(fobj, infix, "Health_issue[]", false)) return false;
		if (ew.valueChanged(fobj, infix, "Indiscipline_activity[]", false)) return false;
		if (ew.valueChanged(fobj, infix, "Involvement", false)) return false;
		return true;
	}

	// Form_CustomValidate
	factivitygrid.Form_CustomValidate = function(fobj) { // DO NOT CHANGE THIS LINE!

		// Your custom validation code here, return false if invalid.
		return true;
	}

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

	// Dynamic selection lists
	factivitygrid.lists["x_Hostel"] = <?php echo $activity_grid->Hostel->Lookup->toClientList($activity_grid) ?>;
	factivitygrid.lists["x_Hostel"].options = <?php echo JsonEncode($activity_grid->Hostel->lookupOptions()) ?>;
	factivitygrid.lists["x_Floor"] = <?php echo $activity_grid->Floor->Lookup->toClientList($activity_grid) ?>;
	factivitygrid.lists["x_Floor"].options = <?php echo JsonEncode($activity_grid->Floor->lookupOptions()) ?>;
	factivitygrid.lists["x_Room_No"] = <?php echo $activity_grid->Room_No->Lookup->toClientList($activity_grid) ?>;
	factivitygrid.lists["x_Room_No"].options = <?php echo JsonEncode($activity_grid->Room_No->lookupOptions()) ?>;
	factivitygrid.lists["x_Health_issue[]"] = <?php echo $activity_grid->Health_issue->Lookup->toClientList($activity_grid) ?>;
	factivitygrid.lists["x_Health_issue[]"].options = <?php echo JsonEncode($activity_grid->Health_issue->lookupOptions()) ?>;
	factivitygrid.lists["x_Indiscipline_activity[]"] = <?php echo $activity_grid->Indiscipline_activity->Lookup->toClientList($activity_grid) ?>;
	factivitygrid.lists["x_Indiscipline_activity[]"].options = <?php echo JsonEncode($activity_grid->Indiscipline_activity->lookupOptions()) ?>;
	factivitygrid.lists["x_Involvement"] = <?php echo $activity_grid->Involvement->Lookup->toClientList($activity_grid) ?>;
	factivitygrid.lists["x_Involvement"].options = <?php echo JsonEncode($activity_grid->Involvement->lookupOptions()) ?>;
	loadjs.done("factivitygrid");
});
</script>
<?php } ?>
<?php
$activity_grid->renderOtherOptions();
?>
<?php if ($activity_grid->TotalRecords > 0 || $activity->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($activity_grid->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> activity">
<?php if ($activity_grid->ShowOtherOptions) { ?>
<div class="card-header ew-grid-upper-panel">
<?php $activity_grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<div id="factivitygrid" class="ew-form ew-list-form form-inline">
<div id="gmp_activity" class="<?php echo ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table id="tbl_activitygrid" class="table ew-table"><!-- .ew-table -->
<thead>
	<tr class="ew-table-header">
<?php

// Header row
$activity->RowType = ROWTYPE_HEADER;

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

// Render list options (header, left)
$activity_grid->ListOptions->render("header", "left");
?>
<?php if ($activity_grid->id->Visible) { // id ?>
	<?php if ($activity_grid->SortUrl($activity_grid->id) == "") { ?>
		<th data-name="id" class="<?php echo $activity_grid->id->headerCellClass() ?>"><div id="elh_activity_id" class="activity_id"><div class="ew-table-header-caption"><?php echo $activity_grid->id->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="id" class="<?php echo $activity_grid->id->headerCellClass() ?>"><div><div id="elh_activity_id" class="activity_id">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->id->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->id->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->id->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->HotelID->Visible) { // HotelID ?>
	<?php if ($activity_grid->SortUrl($activity_grid->HotelID) == "") { ?>
		<th data-name="HotelID" class="<?php echo $activity_grid->HotelID->headerCellClass() ?>"><div id="elh_activity_HotelID" class="activity_HotelID"><div class="ew-table-header-caption"><?php echo $activity_grid->HotelID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="HotelID" class="<?php echo $activity_grid->HotelID->headerCellClass() ?>"><div><div id="elh_activity_HotelID" class="activity_HotelID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->HotelID->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->HotelID->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->HotelID->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->RollNo->Visible) { // RollNo ?>
	<?php if ($activity_grid->SortUrl($activity_grid->RollNo) == "") { ?>
		<th data-name="RollNo" class="<?php echo $activity_grid->RollNo->headerCellClass() ?>"><div id="elh_activity_RollNo" class="activity_RollNo"><div class="ew-table-header-caption"><?php echo $activity_grid->RollNo->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="RollNo" class="<?php echo $activity_grid->RollNo->headerCellClass() ?>"><div><div id="elh_activity_RollNo" class="activity_RollNo">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->RollNo->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->RollNo->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->RollNo->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Name->Visible) { // Name ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Name) == "") { ?>
		<th data-name="Name" class="<?php echo $activity_grid->Name->headerCellClass() ?>"><div id="elh_activity_Name" class="activity_Name"><div class="ew-table-header-caption"><?php echo $activity_grid->Name->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Name" class="<?php echo $activity_grid->Name->headerCellClass() ?>"><div><div id="elh_activity_Name" class="activity_Name">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Name->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Name->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Name->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Hostel->Visible) { // Hostel ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Hostel) == "") { ?>
		<th data-name="Hostel" class="<?php echo $activity_grid->Hostel->headerCellClass() ?>"><div id="elh_activity_Hostel" class="activity_Hostel"><div class="ew-table-header-caption"><?php echo $activity_grid->Hostel->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Hostel" class="<?php echo $activity_grid->Hostel->headerCellClass() ?>"><div><div id="elh_activity_Hostel" class="activity_Hostel">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Hostel->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Hostel->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Hostel->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Floor->Visible) { // Floor ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Floor) == "") { ?>
		<th data-name="Floor" class="<?php echo $activity_grid->Floor->headerCellClass() ?>"><div id="elh_activity_Floor" class="activity_Floor"><div class="ew-table-header-caption"><?php echo $activity_grid->Floor->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Floor" class="<?php echo $activity_grid->Floor->headerCellClass() ?>"><div><div id="elh_activity_Floor" class="activity_Floor">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Floor->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Floor->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Floor->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Room_No->Visible) { // Room_No ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Room_No) == "") { ?>
		<th data-name="Room_No" class="<?php echo $activity_grid->Room_No->headerCellClass() ?>"><div id="elh_activity_Room_No" class="activity_Room_No"><div class="ew-table-header-caption"><?php echo $activity_grid->Room_No->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Room_No" class="<?php echo $activity_grid->Room_No->headerCellClass() ?>"><div><div id="elh_activity_Room_No" class="activity_Room_No">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Room_No->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Room_No->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Room_No->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Health_issue->Visible) { // Health_issue ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Health_issue) == "") { ?>
		<th data-name="Health_issue" class="<?php echo $activity_grid->Health_issue->headerCellClass() ?>"><div id="elh_activity_Health_issue" class="activity_Health_issue"><div class="ew-table-header-caption"><?php echo $activity_grid->Health_issue->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Health_issue" class="<?php echo $activity_grid->Health_issue->headerCellClass() ?>"><div><div id="elh_activity_Health_issue" class="activity_Health_issue">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Health_issue->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Health_issue->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Health_issue->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Indiscipline_activity->Visible) { // Indiscipline_activity ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Indiscipline_activity) == "") { ?>
		<th data-name="Indiscipline_activity" class="<?php echo $activity_grid->Indiscipline_activity->headerCellClass() ?>"><div id="elh_activity_Indiscipline_activity" class="activity_Indiscipline_activity"><div class="ew-table-header-caption"><?php echo $activity_grid->Indiscipline_activity->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Indiscipline_activity" class="<?php echo $activity_grid->Indiscipline_activity->headerCellClass() ?>"><div><div id="elh_activity_Indiscipline_activity" class="activity_Indiscipline_activity">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Indiscipline_activity->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Indiscipline_activity->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Indiscipline_activity->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Involvement->Visible) { // Involvement ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Involvement) == "") { ?>
		<th data-name="Involvement" class="<?php echo $activity_grid->Involvement->headerCellClass() ?>"><div id="elh_activity_Involvement" class="activity_Involvement"><div class="ew-table-header-caption"><?php echo $activity_grid->Involvement->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Involvement" class="<?php echo $activity_grid->Involvement->headerCellClass() ?>"><div><div id="elh_activity_Involvement" class="activity_Involvement">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Involvement->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Involvement->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Involvement->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($activity_grid->Updated_Date->Visible) { // Updated_Date ?>
	<?php if ($activity_grid->SortUrl($activity_grid->Updated_Date) == "") { ?>
		<th data-name="Updated_Date" class="<?php echo $activity_grid->Updated_Date->headerCellClass() ?>"><div id="elh_activity_Updated_Date" class="activity_Updated_Date"><div class="ew-table-header-caption"><?php echo $activity_grid->Updated_Date->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Updated_Date" class="<?php echo $activity_grid->Updated_Date->headerCellClass() ?>"><div><div id="elh_activity_Updated_Date" class="activity_Updated_Date">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $activity_grid->Updated_Date->caption() ?></span><span class="ew-table-header-sort"><?php if ($activity_grid->Updated_Date->getSort() == "ASC") { ?><i class="fas fa-sort-up"></i><?php } elseif ($activity_grid->Updated_Date->getSort() == "DESC") { ?><i class="fas fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

// Render list options (header, right)
$activity_grid->ListOptions->render("header", "right");
?>
	</tr>
</thead>
<tbody>
<?php
$activity_grid->StartRecord = 1;
$activity_grid->StopRecord = $activity_grid->TotalRecords; // Show all records

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

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

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

		// Init row class and style
		$activity->resetAttributes();
		$activity->CssClass = "";
		if ($activity_grid->isGridAdd()) {
			if ($activity->CurrentMode == "copy") {
				$activity_grid->loadRowValues($activity_grid->Recordset); // Load row values
				$activity_grid->setRecordKey($activity_grid->RowOldKey, $activity_grid->Recordset); // Set old record key
			} else {
				$activity_grid->loadRowValues(); // Load default values
				$activity_grid->RowOldKey = ""; // Clear old key value
			}
		} else {
			$activity_grid->loadRowValues($activity_grid->Recordset); // Load row values
		}
		$activity->RowType = ROWTYPE_VIEW; // Render view
		if ($activity_grid->isGridAdd()) // Grid add
			$activity->RowType = ROWTYPE_ADD; // Render add
		if ($activity_grid->isGridAdd() && $activity->EventCancelled && !$CurrentForm->hasValue("k_blankrow")) // Insert failed
			$activity_grid->restoreCurrentRowFormValues($activity_grid->RowIndex); // Restore form values
		if ($activity_grid->isGridEdit()) { // Grid edit
			if ($activity->EventCancelled)
				$activity_grid->restoreCurrentRowFormValues($activity_grid->RowIndex); // Restore form values
			if ($activity_grid->RowAction == "insert")
				$activity->RowType = ROWTYPE_ADD; // Render add
			else
				$activity->RowType = ROWTYPE_EDIT; // Render edit
		}
		if ($activity_grid->isGridEdit() && ($activity->RowType == ROWTYPE_EDIT || $activity->RowType == ROWTYPE_ADD) && $activity->EventCancelled) // Update failed
			$activity_grid->restoreCurrentRowFormValues($activity_grid->RowIndex); // Restore form values
		if ($activity->RowType == ROWTYPE_EDIT) // Edit row
			$activity_grid->EditRowCount++;
		if ($activity->isConfirm()) // Confirm row
			$activity_grid->restoreCurrentRowFormValues($activity_grid->RowIndex); // Restore form values

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

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

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

		// Skip delete row / empty row for confirm page
		if ($activity_grid->RowAction != "delete" && $activity_grid->RowAction != "insertdelete" && !($activity_grid->RowAction == "insert" && $activity->isConfirm() && $activity_grid->emptyRow())) {
?>
	<tr <?php echo $activity->rowAttributes() ?>>
<?php

// Render list options (body, left)
$activity_grid->ListOptions->render("body", "left", $activity_grid->RowCount);
?>
	<?php if ($activity_grid->id->Visible) { // id ?>
		<td data-name="id" <?php echo $activity_grid->id->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_id" class="form-group"></span>
<input type="hidden" data-table="activity" data-field="x_id" name="o<?php echo $activity_grid->RowIndex ?>_id" id="o<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_id" class="form-group">
<span<?php echo $activity_grid->id->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->id->EditValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_id" name="x<?php echo $activity_grid->RowIndex ?>_id" id="x<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->CurrentValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_id">
<span<?php echo $activity_grid->id->viewAttributes() ?>><?php echo $activity_grid->id->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_id" name="x<?php echo $activity_grid->RowIndex ?>_id" id="x<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_id" name="o<?php echo $activity_grid->RowIndex ?>_id" id="o<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_id" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_id" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_id" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_id" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->HotelID->Visible) { // HotelID ?>
		<td data-name="HotelID" <?php echo $activity_grid->HotelID->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($activity_grid->HotelID->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_HotelID" class="form-group">
<span<?php echo $activity_grid->HotelID->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->HotelID->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_HotelID" class="form-group">
<input type="text" data-table="activity" data-field="x_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_grid->HotelID->getPlaceHolder()) ?>" value="<?php echo $activity_grid->HotelID->EditValue ?>"<?php echo $activity_grid->HotelID->editAttributes() ?>>
</span>
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_HotelID" name="o<?php echo $activity_grid->RowIndex ?>_HotelID" id="o<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($activity_grid->HotelID->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_HotelID" class="form-group">
<span<?php echo $activity_grid->HotelID->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->HotelID->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_HotelID" class="form-group">
<input type="text" data-table="activity" data-field="x_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_grid->HotelID->getPlaceHolder()) ?>" value="<?php echo $activity_grid->HotelID->EditValue ?>"<?php echo $activity_grid->HotelID->editAttributes() ?>>
</span>
<?php } ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_HotelID">
<span<?php echo $activity_grid->HotelID->viewAttributes() ?>><?php echo $activity_grid->HotelID->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_HotelID" name="o<?php echo $activity_grid->RowIndex ?>_HotelID" id="o<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_HotelID" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_HotelID" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_HotelID" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_HotelID" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->RollNo->Visible) { // RollNo ?>
		<td data-name="RollNo" <?php echo $activity_grid->RollNo->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($activity_grid->RollNo->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_RollNo" class="form-group">
<span<?php echo $activity_grid->RollNo->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->RollNo->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_RollNo" class="form-group">
<input type="text" data-table="activity" data-field="x_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_grid->RollNo->getPlaceHolder()) ?>" value="<?php echo $activity_grid->RollNo->EditValue ?>"<?php echo $activity_grid->RollNo->editAttributes() ?>>
</span>
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_RollNo" name="o<?php echo $activity_grid->RowIndex ?>_RollNo" id="o<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($activity_grid->RollNo->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_RollNo" class="form-group">
<span<?php echo $activity_grid->RollNo->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->RollNo->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_RollNo" class="form-group">
<input type="text" data-table="activity" data-field="x_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_grid->RollNo->getPlaceHolder()) ?>" value="<?php echo $activity_grid->RollNo->EditValue ?>"<?php echo $activity_grid->RollNo->editAttributes() ?>>
</span>
<?php } ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_RollNo">
<span<?php echo $activity_grid->RollNo->viewAttributes() ?>><?php echo $activity_grid->RollNo->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_RollNo" name="o<?php echo $activity_grid->RowIndex ?>_RollNo" id="o<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_RollNo" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_RollNo" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_RollNo" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_RollNo" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Name->Visible) { // Name ?>
		<td data-name="Name" <?php echo $activity_grid->Name->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($activity_grid->Name->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Name" class="form-group">
<span<?php echo $activity_grid->Name->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Name->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Name" class="form-group">
<input type="text" data-table="activity" data-field="x_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" id="x<?php echo $activity_grid->RowIndex ?>_Name" size="30" maxlength="55" placeholder="<?php echo HtmlEncode($activity_grid->Name->getPlaceHolder()) ?>" value="<?php echo $activity_grid->Name->EditValue ?>"<?php echo $activity_grid->Name->editAttributes() ?>>
</span>
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Name" name="o<?php echo $activity_grid->RowIndex ?>_Name" id="o<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($activity_grid->Name->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Name" class="form-group">
<span<?php echo $activity_grid->Name->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Name->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Name" class="form-group">
<input type="text" data-table="activity" data-field="x_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" id="x<?php echo $activity_grid->RowIndex ?>_Name" size="30" maxlength="55" placeholder="<?php echo HtmlEncode($activity_grid->Name->getPlaceHolder()) ?>" value="<?php echo $activity_grid->Name->EditValue ?>"<?php echo $activity_grid->Name->editAttributes() ?>>
</span>
<?php } ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Name">
<span<?php echo $activity_grid->Name->viewAttributes() ?>><?php echo $activity_grid->Name->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" id="x<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Name" name="o<?php echo $activity_grid->RowIndex ?>_Name" id="o<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Name" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Name" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Name" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Name" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Hostel->Visible) { // Hostel ?>
		<td data-name="Hostel" <?php echo $activity_grid->Hostel->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($activity_grid->Hostel->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Hostel" class="form-group">
<span<?php echo $activity_grid->Hostel->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Hostel->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Hostel" class="form-group">
<?php $activity_grid->Hostel->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Hostel" data-value-separator="<?php echo $activity_grid->Hostel->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel"<?php echo $activity_grid->Hostel->editAttributes() ?>>
			<?php echo $activity_grid->Hostel->selectOptionListHtml("x{$activity_grid->RowIndex}_Hostel") ?>
		</select>
</div>
<?php echo $activity_grid->Hostel->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Hostel") ?>
</span>
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Hostel" name="o<?php echo $activity_grid->RowIndex ?>_Hostel" id="o<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($activity_grid->Hostel->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Hostel" class="form-group">
<span<?php echo $activity_grid->Hostel->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Hostel->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Hostel" class="form-group">
<?php $activity_grid->Hostel->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Hostel" data-value-separator="<?php echo $activity_grid->Hostel->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel"<?php echo $activity_grid->Hostel->editAttributes() ?>>
			<?php echo $activity_grid->Hostel->selectOptionListHtml("x{$activity_grid->RowIndex}_Hostel") ?>
		</select>
</div>
<?php echo $activity_grid->Hostel->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Hostel") ?>
</span>
<?php } ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Hostel">
<span<?php echo $activity_grid->Hostel->viewAttributes() ?>><?php echo $activity_grid->Hostel->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Hostel" name="o<?php echo $activity_grid->RowIndex ?>_Hostel" id="o<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Hostel" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Hostel" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Hostel" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Hostel" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Floor->Visible) { // Floor ?>
		<td data-name="Floor" <?php echo $activity_grid->Floor->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($activity_grid->Floor->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Floor" class="form-group">
<span<?php echo $activity_grid->Floor->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Floor->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Floor" class="form-group">
<?php $activity_grid->Floor->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Floor" data-value-separator="<?php echo $activity_grid->Floor->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor"<?php echo $activity_grid->Floor->editAttributes() ?>>
			<?php echo $activity_grid->Floor->selectOptionListHtml("x{$activity_grid->RowIndex}_Floor") ?>
		</select>
</div>
<?php echo $activity_grid->Floor->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Floor") ?>
</span>
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Floor" name="o<?php echo $activity_grid->RowIndex ?>_Floor" id="o<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($activity_grid->Floor->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Floor" class="form-group">
<span<?php echo $activity_grid->Floor->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Floor->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Floor" class="form-group">
<?php $activity_grid->Floor->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Floor" data-value-separator="<?php echo $activity_grid->Floor->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor"<?php echo $activity_grid->Floor->editAttributes() ?>>
			<?php echo $activity_grid->Floor->selectOptionListHtml("x{$activity_grid->RowIndex}_Floor") ?>
		</select>
</div>
<?php echo $activity_grid->Floor->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Floor") ?>
</span>
<?php } ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Floor">
<span<?php echo $activity_grid->Floor->viewAttributes() ?>><?php echo $activity_grid->Floor->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor" id="x<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Floor" name="o<?php echo $activity_grid->RowIndex ?>_Floor" id="o<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Floor" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Floor" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Floor" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Floor" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Room_No->Visible) { // Room_No ?>
		<td data-name="Room_No" <?php echo $activity_grid->Room_No->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($activity_grid->Room_No->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Room_No" class="form-group">
<span<?php echo $activity_grid->Room_No->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Room_No->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Room_No" class="form-group">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Room_No" data-value-separator="<?php echo $activity_grid->Room_No->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No"<?php echo $activity_grid->Room_No->editAttributes() ?>>
			<?php echo $activity_grid->Room_No->selectOptionListHtml("x{$activity_grid->RowIndex}_Room_No") ?>
		</select>
</div>
<?php echo $activity_grid->Room_No->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Room_No") ?>
</span>
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Room_No" name="o<?php echo $activity_grid->RowIndex ?>_Room_No" id="o<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($activity_grid->Room_No->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Room_No" class="form-group">
<span<?php echo $activity_grid->Room_No->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Room_No->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Room_No" class="form-group">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Room_No" data-value-separator="<?php echo $activity_grid->Room_No->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No"<?php echo $activity_grid->Room_No->editAttributes() ?>>
			<?php echo $activity_grid->Room_No->selectOptionListHtml("x{$activity_grid->RowIndex}_Room_No") ?>
		</select>
</div>
<?php echo $activity_grid->Room_No->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Room_No") ?>
</span>
<?php } ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Room_No">
<span<?php echo $activity_grid->Room_No->viewAttributes() ?>><?php echo $activity_grid->Room_No->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Room_No" name="o<?php echo $activity_grid->RowIndex ?>_Room_No" id="o<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Room_No" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Room_No" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Room_No" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Room_No" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Health_issue->Visible) { // Health_issue ?>
		<td data-name="Health_issue" <?php echo $activity_grid->Health_issue->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Health_issue" class="form-group">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x<?php echo $activity_grid->RowIndex ?>_Health_issue"><?php echo EmptyValue(strval($activity_grid->Health_issue->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_grid->Health_issue->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_grid->Health_issue->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_grid->Health_issue->ReadOnly || $activity_grid->Health_issue->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x<?php echo $activity_grid->RowIndex ?>_Health_issue[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_grid->Health_issue->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Health_issue") ?>
<input type="hidden" data-table="activity" data-field="x_Health_issue" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_grid->Health_issue->displayValueSeparatorAttribute() ?>" name="x<?php echo $activity_grid->RowIndex ?>_Health_issue[]" id="x<?php echo $activity_grid->RowIndex ?>_Health_issue[]" value="<?php echo $activity_grid->Health_issue->CurrentValue ?>"<?php echo $activity_grid->Health_issue->editAttributes() ?>>
</span>
<input type="hidden" data-table="activity" data-field="x_Health_issue" name="o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" id="o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" value="<?php echo HtmlEncode($activity_grid->Health_issue->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Health_issue" class="form-group">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x<?php echo $activity_grid->RowIndex ?>_Health_issue"><?php echo EmptyValue(strval($activity_grid->Health_issue->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_grid->Health_issue->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_grid->Health_issue->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_grid->Health_issue->ReadOnly || $activity_grid->Health_issue->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x<?php echo $activity_grid->RowIndex ?>_Health_issue[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_grid->Health_issue->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Health_issue") ?>
<input type="hidden" data-table="activity" data-field="x_Health_issue" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_grid->Health_issue->displayValueSeparatorAttribute() ?>" name="x<?php echo $activity_grid->RowIndex ?>_Health_issue[]" id="x<?php echo $activity_grid->RowIndex ?>_Health_issue[]" value="<?php echo $activity_grid->Health_issue->CurrentValue ?>"<?php echo $activity_grid->Health_issue->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Health_issue">
<span<?php echo $activity_grid->Health_issue->viewAttributes() ?>><?php echo $activity_grid->Health_issue->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Health_issue" name="x<?php echo $activity_grid->RowIndex ?>_Health_issue" id="x<?php echo $activity_grid->RowIndex ?>_Health_issue" value="<?php echo HtmlEncode($activity_grid->Health_issue->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Health_issue" name="o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" id="o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" value="<?php echo HtmlEncode($activity_grid->Health_issue->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Health_issue" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Health_issue" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Health_issue" value="<?php echo HtmlEncode($activity_grid->Health_issue->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Health_issue" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" value="<?php echo HtmlEncode($activity_grid->Health_issue->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Indiscipline_activity->Visible) { // Indiscipline_activity ?>
		<td data-name="Indiscipline_activity" <?php echo $activity_grid->Indiscipline_activity->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($activity_grid->Indiscipline_activity->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Indiscipline_activity" class="form-group">
<span<?php echo $activity_grid->Indiscipline_activity->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Indiscipline_activity->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Indiscipline_activity" class="form-group">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity"><?php echo EmptyValue(strval($activity_grid->Indiscipline_activity->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_grid->Indiscipline_activity->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_grid->Indiscipline_activity->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_grid->Indiscipline_activity->ReadOnly || $activity_grid->Indiscipline_activity->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_grid->Indiscipline_activity->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Indiscipline_activity") ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_grid->Indiscipline_activity->displayValueSeparatorAttribute() ?>" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" value="<?php echo $activity_grid->Indiscipline_activity->CurrentValue ?>"<?php echo $activity_grid->Indiscipline_activity->editAttributes() ?>>
</span>
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" name="o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" id="o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($activity_grid->Indiscipline_activity->getSessionValue() != "") { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Indiscipline_activity" class="form-group">
<span<?php echo $activity_grid->Indiscipline_activity->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Indiscipline_activity->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Indiscipline_activity" class="form-group">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity"><?php echo EmptyValue(strval($activity_grid->Indiscipline_activity->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_grid->Indiscipline_activity->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_grid->Indiscipline_activity->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_grid->Indiscipline_activity->ReadOnly || $activity_grid->Indiscipline_activity->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_grid->Indiscipline_activity->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Indiscipline_activity") ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_grid->Indiscipline_activity->displayValueSeparatorAttribute() ?>" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" value="<?php echo $activity_grid->Indiscipline_activity->CurrentValue ?>"<?php echo $activity_grid->Indiscipline_activity->editAttributes() ?>>
</span>
<?php } ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Indiscipline_activity">
<span<?php echo $activity_grid->Indiscipline_activity->viewAttributes() ?>><?php echo $activity_grid->Indiscipline_activity->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" name="o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" id="o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Involvement->Visible) { // Involvement ?>
		<td data-name="Involvement" <?php echo $activity_grid->Involvement->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Involvement" class="form-group">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Involvement" data-value-separator="<?php echo $activity_grid->Involvement->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Involvement" name="x<?php echo $activity_grid->RowIndex ?>_Involvement"<?php echo $activity_grid->Involvement->editAttributes() ?>>
			<?php echo $activity_grid->Involvement->selectOptionListHtml("x{$activity_grid->RowIndex}_Involvement") ?>
		</select>
</div>
<?php echo $activity_grid->Involvement->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Involvement") ?>
</span>
<input type="hidden" data-table="activity" data-field="x_Involvement" name="o<?php echo $activity_grid->RowIndex ?>_Involvement" id="o<?php echo $activity_grid->RowIndex ?>_Involvement" value="<?php echo HtmlEncode($activity_grid->Involvement->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Involvement" class="form-group">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Involvement" data-value-separator="<?php echo $activity_grid->Involvement->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Involvement" name="x<?php echo $activity_grid->RowIndex ?>_Involvement"<?php echo $activity_grid->Involvement->editAttributes() ?>>
			<?php echo $activity_grid->Involvement->selectOptionListHtml("x{$activity_grid->RowIndex}_Involvement") ?>
		</select>
</div>
<?php echo $activity_grid->Involvement->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Involvement") ?>
</span>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Involvement">
<span<?php echo $activity_grid->Involvement->viewAttributes() ?>><?php echo $activity_grid->Involvement->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Involvement" name="x<?php echo $activity_grid->RowIndex ?>_Involvement" id="x<?php echo $activity_grid->RowIndex ?>_Involvement" value="<?php echo HtmlEncode($activity_grid->Involvement->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Involvement" name="o<?php echo $activity_grid->RowIndex ?>_Involvement" id="o<?php echo $activity_grid->RowIndex ?>_Involvement" value="<?php echo HtmlEncode($activity_grid->Involvement->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Involvement" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Involvement" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Involvement" value="<?php echo HtmlEncode($activity_grid->Involvement->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Involvement" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Involvement" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Involvement" value="<?php echo HtmlEncode($activity_grid->Involvement->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($activity_grid->Updated_Date->Visible) { // Updated_Date ?>
		<td data-name="Updated_Date" <?php echo $activity_grid->Updated_Date->cellAttributes() ?>>
<?php if ($activity->RowType == ROWTYPE_ADD) { // Add record ?>
<input type="hidden" data-table="activity" data-field="x_Updated_Date" name="o<?php echo $activity_grid->RowIndex ?>_Updated_Date" id="o<?php echo $activity_grid->RowIndex ?>_Updated_Date" value="<?php echo HtmlEncode($activity_grid->Updated_Date->OldValue) ?>">
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php } ?>
<?php if ($activity->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $activity_grid->RowCount ?>_activity_Updated_Date">
<span<?php echo $activity_grid->Updated_Date->viewAttributes() ?>><?php echo $activity_grid->Updated_Date->getViewValue() ?></span>
</span>
<?php if (!$activity->isConfirm()) { ?>
<input type="hidden" data-table="activity" data-field="x_Updated_Date" name="x<?php echo $activity_grid->RowIndex ?>_Updated_Date" id="x<?php echo $activity_grid->RowIndex ?>_Updated_Date" value="<?php echo HtmlEncode($activity_grid->Updated_Date->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Updated_Date" name="o<?php echo $activity_grid->RowIndex ?>_Updated_Date" id="o<?php echo $activity_grid->RowIndex ?>_Updated_Date" value="<?php echo HtmlEncode($activity_grid->Updated_Date->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="activity" data-field="x_Updated_Date" name="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Updated_Date" id="factivitygrid$x<?php echo $activity_grid->RowIndex ?>_Updated_Date" value="<?php echo HtmlEncode($activity_grid->Updated_Date->FormValue) ?>">
<input type="hidden" data-table="activity" data-field="x_Updated_Date" name="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Updated_Date" id="factivitygrid$o<?php echo $activity_grid->RowIndex ?>_Updated_Date" value="<?php echo HtmlEncode($activity_grid->Updated_Date->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$activity_grid->ListOptions->render("body", "right", $activity_grid->RowCount);
?>
	</tr>
<?php if ($activity->RowType == ROWTYPE_ADD || $activity->RowType == ROWTYPE_EDIT) { ?>
<script>
loadjs.ready(["factivitygrid", "load"], function() {
	factivitygrid.updateLists(<?php echo $activity_grid->RowIndex ?>);
});
</script>
<?php } ?>
<?php
	}
	} // End delete row checking
	if (!$activity_grid->isGridAdd() || $activity->CurrentMode == "copy")
		if (!$activity_grid->Recordset->EOF)
			$activity_grid->Recordset->moveNext();
}
?>
<?php
	if ($activity->CurrentMode == "add" || $activity->CurrentMode == "copy" || $activity->CurrentMode == "edit") {
		$activity_grid->RowIndex = '$rowindex$';
		$activity_grid->loadRowValues();

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

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

		// Render list options
		$activity_grid->renderListOptions();
		$activity_grid->StartRowCount = 0;
?>
	<tr <?php echo $activity->rowAttributes() ?>>
<?php

// Render list options (body, left)
$activity_grid->ListOptions->render("body", "left", $activity_grid->RowIndex);
?>
	<?php if ($activity_grid->id->Visible) { // id ?>
		<td data-name="id">
<?php if (!$activity->isConfirm()) { ?>
<span id="el$rowindex$_activity_id" class="form-group activity_id"></span>
<?php } else { ?>
<span id="el$rowindex$_activity_id" class="form-group activity_id">
<span<?php echo $activity_grid->id->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->id->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_id" name="x<?php echo $activity_grid->RowIndex ?>_id" id="x<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_id" name="o<?php echo $activity_grid->RowIndex ?>_id" id="o<?php echo $activity_grid->RowIndex ?>_id" value="<?php echo HtmlEncode($activity_grid->id->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->HotelID->Visible) { // HotelID ?>
		<td data-name="HotelID">
<?php if (!$activity->isConfirm()) { ?>
<?php if ($activity_grid->HotelID->getSessionValue() != "") { ?>
<span id="el$rowindex$_activity_HotelID" class="form-group activity_HotelID">
<span<?php echo $activity_grid->HotelID->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->HotelID->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_activity_HotelID" class="form-group activity_HotelID">
<input type="text" data-table="activity" data-field="x_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_grid->HotelID->getPlaceHolder()) ?>" value="<?php echo $activity_grid->HotelID->EditValue ?>"<?php echo $activity_grid->HotelID->editAttributes() ?>>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_activity_HotelID" class="form-group activity_HotelID">
<span<?php echo $activity_grid->HotelID->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->HotelID->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_HotelID" name="x<?php echo $activity_grid->RowIndex ?>_HotelID" id="x<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_HotelID" name="o<?php echo $activity_grid->RowIndex ?>_HotelID" id="o<?php echo $activity_grid->RowIndex ?>_HotelID" value="<?php echo HtmlEncode($activity_grid->HotelID->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->RollNo->Visible) { // RollNo ?>
		<td data-name="RollNo">
<?php if (!$activity->isConfirm()) { ?>
<?php if ($activity_grid->RollNo->getSessionValue() != "") { ?>
<span id="el$rowindex$_activity_RollNo" class="form-group activity_RollNo">
<span<?php echo $activity_grid->RollNo->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->RollNo->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_activity_RollNo" class="form-group activity_RollNo">
<input type="text" data-table="activity" data-field="x_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_grid->RollNo->getPlaceHolder()) ?>" value="<?php echo $activity_grid->RollNo->EditValue ?>"<?php echo $activity_grid->RollNo->editAttributes() ?>>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_activity_RollNo" class="form-group activity_RollNo">
<span<?php echo $activity_grid->RollNo->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->RollNo->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_RollNo" name="x<?php echo $activity_grid->RowIndex ?>_RollNo" id="x<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_RollNo" name="o<?php echo $activity_grid->RowIndex ?>_RollNo" id="o<?php echo $activity_grid->RowIndex ?>_RollNo" value="<?php echo HtmlEncode($activity_grid->RollNo->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Name->Visible) { // Name ?>
		<td data-name="Name">
<?php if (!$activity->isConfirm()) { ?>
<?php if ($activity_grid->Name->getSessionValue() != "") { ?>
<span id="el$rowindex$_activity_Name" class="form-group activity_Name">
<span<?php echo $activity_grid->Name->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Name->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_activity_Name" class="form-group activity_Name">
<input type="text" data-table="activity" data-field="x_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" id="x<?php echo $activity_grid->RowIndex ?>_Name" size="30" maxlength="55" placeholder="<?php echo HtmlEncode($activity_grid->Name->getPlaceHolder()) ?>" value="<?php echo $activity_grid->Name->EditValue ?>"<?php echo $activity_grid->Name->editAttributes() ?>>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_activity_Name" class="form-group activity_Name">
<span<?php echo $activity_grid->Name->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Name->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Name" name="x<?php echo $activity_grid->RowIndex ?>_Name" id="x<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Name" name="o<?php echo $activity_grid->RowIndex ?>_Name" id="o<?php echo $activity_grid->RowIndex ?>_Name" value="<?php echo HtmlEncode($activity_grid->Name->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Hostel->Visible) { // Hostel ?>
		<td data-name="Hostel">
<?php if (!$activity->isConfirm()) { ?>
<?php if ($activity_grid->Hostel->getSessionValue() != "") { ?>
<span id="el$rowindex$_activity_Hostel" class="form-group activity_Hostel">
<span<?php echo $activity_grid->Hostel->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Hostel->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_activity_Hostel" class="form-group activity_Hostel">
<?php $activity_grid->Hostel->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Hostel" data-value-separator="<?php echo $activity_grid->Hostel->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel"<?php echo $activity_grid->Hostel->editAttributes() ?>>
			<?php echo $activity_grid->Hostel->selectOptionListHtml("x{$activity_grid->RowIndex}_Hostel") ?>
		</select>
</div>
<?php echo $activity_grid->Hostel->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Hostel") ?>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_activity_Hostel" class="form-group activity_Hostel">
<span<?php echo $activity_grid->Hostel->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Hostel->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Hostel" name="x<?php echo $activity_grid->RowIndex ?>_Hostel" id="x<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Hostel" name="o<?php echo $activity_grid->RowIndex ?>_Hostel" id="o<?php echo $activity_grid->RowIndex ?>_Hostel" value="<?php echo HtmlEncode($activity_grid->Hostel->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Floor->Visible) { // Floor ?>
		<td data-name="Floor">
<?php if (!$activity->isConfirm()) { ?>
<?php if ($activity_grid->Floor->getSessionValue() != "") { ?>
<span id="el$rowindex$_activity_Floor" class="form-group activity_Floor">
<span<?php echo $activity_grid->Floor->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Floor->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_activity_Floor" class="form-group activity_Floor">
<?php $activity_grid->Floor->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Floor" data-value-separator="<?php echo $activity_grid->Floor->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor"<?php echo $activity_grid->Floor->editAttributes() ?>>
			<?php echo $activity_grid->Floor->selectOptionListHtml("x{$activity_grid->RowIndex}_Floor") ?>
		</select>
</div>
<?php echo $activity_grid->Floor->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Floor") ?>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_activity_Floor" class="form-group activity_Floor">
<span<?php echo $activity_grid->Floor->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Floor->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Floor" name="x<?php echo $activity_grid->RowIndex ?>_Floor" id="x<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Floor" name="o<?php echo $activity_grid->RowIndex ?>_Floor" id="o<?php echo $activity_grid->RowIndex ?>_Floor" value="<?php echo HtmlEncode($activity_grid->Floor->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Room_No->Visible) { // Room_No ?>
		<td data-name="Room_No">
<?php if (!$activity->isConfirm()) { ?>
<?php if ($activity_grid->Room_No->getSessionValue() != "") { ?>
<span id="el$rowindex$_activity_Room_No" class="form-group activity_Room_No">
<span<?php echo $activity_grid->Room_No->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Room_No->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_activity_Room_No" class="form-group activity_Room_No">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Room_No" data-value-separator="<?php echo $activity_grid->Room_No->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No"<?php echo $activity_grid->Room_No->editAttributes() ?>>
			<?php echo $activity_grid->Room_No->selectOptionListHtml("x{$activity_grid->RowIndex}_Room_No") ?>
		</select>
</div>
<?php echo $activity_grid->Room_No->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Room_No") ?>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_activity_Room_No" class="form-group activity_Room_No">
<span<?php echo $activity_grid->Room_No->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Room_No->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Room_No" name="x<?php echo $activity_grid->RowIndex ?>_Room_No" id="x<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Room_No" name="o<?php echo $activity_grid->RowIndex ?>_Room_No" id="o<?php echo $activity_grid->RowIndex ?>_Room_No" value="<?php echo HtmlEncode($activity_grid->Room_No->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Health_issue->Visible) { // Health_issue ?>
		<td data-name="Health_issue">
<?php if (!$activity->isConfirm()) { ?>
<span id="el$rowindex$_activity_Health_issue" class="form-group activity_Health_issue">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x<?php echo $activity_grid->RowIndex ?>_Health_issue"><?php echo EmptyValue(strval($activity_grid->Health_issue->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_grid->Health_issue->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_grid->Health_issue->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_grid->Health_issue->ReadOnly || $activity_grid->Health_issue->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x<?php echo $activity_grid->RowIndex ?>_Health_issue[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_grid->Health_issue->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Health_issue") ?>
<input type="hidden" data-table="activity" data-field="x_Health_issue" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_grid->Health_issue->displayValueSeparatorAttribute() ?>" name="x<?php echo $activity_grid->RowIndex ?>_Health_issue[]" id="x<?php echo $activity_grid->RowIndex ?>_Health_issue[]" value="<?php echo $activity_grid->Health_issue->CurrentValue ?>"<?php echo $activity_grid->Health_issue->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_activity_Health_issue" class="form-group activity_Health_issue">
<span<?php echo $activity_grid->Health_issue->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Health_issue->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Health_issue" name="x<?php echo $activity_grid->RowIndex ?>_Health_issue" id="x<?php echo $activity_grid->RowIndex ?>_Health_issue" value="<?php echo HtmlEncode($activity_grid->Health_issue->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Health_issue" name="o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" id="o<?php echo $activity_grid->RowIndex ?>_Health_issue[]" value="<?php echo HtmlEncode($activity_grid->Health_issue->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Indiscipline_activity->Visible) { // Indiscipline_activity ?>
		<td data-name="Indiscipline_activity">
<?php if (!$activity->isConfirm()) { ?>
<?php if ($activity_grid->Indiscipline_activity->getSessionValue() != "") { ?>
<span id="el$rowindex$_activity_Indiscipline_activity" class="form-group activity_Indiscipline_activity">
<span<?php echo $activity_grid->Indiscipline_activity->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Indiscipline_activity->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_activity_Indiscipline_activity" class="form-group activity_Indiscipline_activity">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity"><?php echo EmptyValue(strval($activity_grid->Indiscipline_activity->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_grid->Indiscipline_activity->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_grid->Indiscipline_activity->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_grid->Indiscipline_activity->ReadOnly || $activity_grid->Indiscipline_activity->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_grid->Indiscipline_activity->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Indiscipline_activity") ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_grid->Indiscipline_activity->displayValueSeparatorAttribute() ?>" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" value="<?php echo $activity_grid->Indiscipline_activity->CurrentValue ?>"<?php echo $activity_grid->Indiscipline_activity->editAttributes() ?>>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_activity_Indiscipline_activity" class="form-group activity_Indiscipline_activity">
<span<?php echo $activity_grid->Indiscipline_activity->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Indiscipline_activity->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" name="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" id="x<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" name="o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" id="o<?php echo $activity_grid->RowIndex ?>_Indiscipline_activity[]" value="<?php echo HtmlEncode($activity_grid->Indiscipline_activity->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Involvement->Visible) { // Involvement ?>
		<td data-name="Involvement">
<?php if (!$activity->isConfirm()) { ?>
<span id="el$rowindex$_activity_Involvement" class="form-group activity_Involvement">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Involvement" data-value-separator="<?php echo $activity_grid->Involvement->displayValueSeparatorAttribute() ?>" id="x<?php echo $activity_grid->RowIndex ?>_Involvement" name="x<?php echo $activity_grid->RowIndex ?>_Involvement"<?php echo $activity_grid->Involvement->editAttributes() ?>>
			<?php echo $activity_grid->Involvement->selectOptionListHtml("x{$activity_grid->RowIndex}_Involvement") ?>
		</select>
</div>
<?php echo $activity_grid->Involvement->Lookup->getParamTag($activity_grid, "p_x" . $activity_grid->RowIndex . "_Involvement") ?>
</span>
<?php } else { ?>
<span id="el$rowindex$_activity_Involvement" class="form-group activity_Involvement">
<span<?php echo $activity_grid->Involvement->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Involvement->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Involvement" name="x<?php echo $activity_grid->RowIndex ?>_Involvement" id="x<?php echo $activity_grid->RowIndex ?>_Involvement" value="<?php echo HtmlEncode($activity_grid->Involvement->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Involvement" name="o<?php echo $activity_grid->RowIndex ?>_Involvement" id="o<?php echo $activity_grid->RowIndex ?>_Involvement" value="<?php echo HtmlEncode($activity_grid->Involvement->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($activity_grid->Updated_Date->Visible) { // Updated_Date ?>
		<td data-name="Updated_Date">
<?php if (!$activity->isConfirm()) { ?>
<?php } else { ?>
<span id="el$rowindex$_activity_Updated_Date" class="form-group activity_Updated_Date">
<span<?php echo $activity_grid->Updated_Date->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_grid->Updated_Date->ViewValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_Updated_Date" name="x<?php echo $activity_grid->RowIndex ?>_Updated_Date" id="x<?php echo $activity_grid->RowIndex ?>_Updated_Date" value="<?php echo HtmlEncode($activity_grid->Updated_Date->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="activity" data-field="x_Updated_Date" name="o<?php echo $activity_grid->RowIndex ?>_Updated_Date" id="o<?php echo $activity_grid->RowIndex ?>_Updated_Date" value="<?php echo HtmlEncode($activity_grid->Updated_Date->OldValue) ?>">
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$activity_grid->ListOptions->render("body", "right", $activity_grid->RowIndex);
?>
<script>
loadjs.ready(["factivitygrid", "load"], function() {
	factivitygrid.updateLists(<?php echo $activity_grid->RowIndex ?>);
});
</script>
	</tr>
<?php
	}
?>
</tbody>
</table><!-- /.ew-table -->
</div><!-- /.ew-grid-middle-panel -->
<?php if ($activity->CurrentMode == "add" || $activity->CurrentMode == "copy") { ?>
<input type="hidden" name="<?php echo $activity_grid->FormKeyCountName ?>" id="<?php echo $activity_grid->FormKeyCountName ?>" value="<?php echo $activity_grid->KeyCount ?>">
<?php echo $activity_grid->MultiSelectKey ?>
<?php } ?>
<?php if ($activity->CurrentMode == "edit") { ?>
<input type="hidden" name="<?php echo $activity_grid->FormKeyCountName ?>" id="<?php echo $activity_grid->FormKeyCountName ?>" value="<?php echo $activity_grid->KeyCount ?>">
<?php echo $activity_grid->MultiSelectKey ?>
<?php } ?>
<?php if ($activity->CurrentMode == "") { ?>
<input type="hidden" name="action" id="action" value="">
<?php } ?>
<input type="hidden" name="detailpage" value="factivitygrid">
</div><!-- /.ew-list-form -->
<?php

// Close recordset
if ($activity_grid->Recordset)
	$activity_grid->Recordset->Close();
?>
<?php if ($activity_grid->ShowOtherOptions) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php $activity_grid->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($activity_grid->TotalRecords == 0 && !$activity->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $activity_grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php if (!$activity_grid->isExport()) { ?>
<script>
loadjs.ready("load", function() {

	// Startup script
	// Write your table-specific startup script here
	// console.log("page loaded");

});
</script>
<?php } ?>
<?php
$activity_grid->terminate();
?>