<?php
namespace PHPMaker2019\project_germanos;

// Write header
WriteHeader(FALSE);

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

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

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

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

// Page Rendering event
$judgeaddress_grid->Page_Render();
?>
<?php if (!$judgeaddress->isExport()) { ?>
<script>

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

// Validate form
fjudgeaddressgrid.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 ($judgeaddress_grid->JudgeID->Required) { ?>
			elm = this.getElements("x" + infix + "_JudgeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->JudgeID->caption(), $judgeaddress->JudgeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->AddressTypeID->Required) { ?>
			elm = this.getElements("x" + infix + "_AddressTypeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->AddressTypeID->caption(), $judgeaddress->AddressTypeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->Address->Required) { ?>
			elm = this.getElements("x" + infix + "_Address");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Address->caption(), $judgeaddress->Address->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->City->Required) { ?>
			elm = this.getElements("x" + infix + "_City");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->City->caption(), $judgeaddress->City->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->Region->Required) { ?>
			elm = this.getElements("x" + infix + "_Region");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Region->caption(), $judgeaddress->Region->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->PostalCode->Required) { ?>
			elm = this.getElements("x" + infix + "_PostalCode");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->PostalCode->caption(), $judgeaddress->PostalCode->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->Country->Required) { ?>
			elm = this.getElements("x" + infix + "_Country");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Country->caption(), $judgeaddress->Country->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->Notes->Required) { ?>
			elm = this.getElements("x" + infix + "_Notes");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Notes->caption(), $judgeaddress->Notes->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_grid->Primary->Required) { ?>
			elm = this.getElements("x" + infix + "_Primary[]");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Primary->caption(), $judgeaddress->Primary->RequiredErrorMessage)) ?>");
		<?php } ?>

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

// Check empty row
fjudgeaddressgrid.emptyRow = function(infix) {
	var fobj = this._form;
	if (ew.valueChanged(fobj, infix, "JudgeID", false)) return false;
	if (ew.valueChanged(fobj, infix, "AddressTypeID", false)) return false;
	if (ew.valueChanged(fobj, infix, "Address", false)) return false;
	if (ew.valueChanged(fobj, infix, "City", false)) return false;
	if (ew.valueChanged(fobj, infix, "Region", false)) return false;
	if (ew.valueChanged(fobj, infix, "PostalCode", false)) return false;
	if (ew.valueChanged(fobj, infix, "Country", false)) return false;
	if (ew.valueChanged(fobj, infix, "Notes", false)) return false;
	if (ew.valueChanged(fobj, infix, "Primary[]", true)) return false;
	return true;
}

// Form_CustomValidate event
fjudgeaddressgrid.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
fjudgeaddressgrid.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
fjudgeaddressgrid.lists["x_JudgeID"] = <?php echo $judgeaddress_grid->JudgeID->Lookup->toClientList() ?>;
fjudgeaddressgrid.lists["x_JudgeID"].options = <?php echo JsonEncode($judgeaddress_grid->JudgeID->lookupOptions()) ?>;
fjudgeaddressgrid.lists["x_AddressTypeID"] = <?php echo $judgeaddress_grid->AddressTypeID->Lookup->toClientList() ?>;
fjudgeaddressgrid.lists["x_AddressTypeID"].options = <?php echo JsonEncode($judgeaddress_grid->AddressTypeID->lookupOptions()) ?>;
fjudgeaddressgrid.lists["x_Primary[]"] = <?php echo $judgeaddress_grid->Primary->Lookup->toClientList() ?>;
fjudgeaddressgrid.lists["x_Primary[]"].options = <?php echo JsonEncode($judgeaddress_grid->Primary->options(FALSE, TRUE)) ?>;

// Form object for search
</script>
<script src="phpjs/ewscrolltable.js"></script>
<?php } ?>
<?php
$judgeaddress_grid->renderOtherOptions();
?>
<?php $judgeaddress_grid->showPageHeader(); ?>
<?php
$judgeaddress_grid->showMessage();
?>
<?php if ($judgeaddress_grid->TotalRecs > 0 || $judgeaddress->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($judgeaddress_grid->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> judgeaddress">
<?php if ($judgeaddress_grid->ShowOtherOptions) { ?>
<div class="card-header ew-grid-upper-panel">
<?php $judgeaddress_grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<div id="fjudgeaddressgrid" class="ew-form ew-list-form form-inline">
<div id="gmp_judgeaddress" class="<?php if (IsResponsiveLayout()) { ?>table-responsive <?php } ?>card-body ew-grid-middle-panel">
<table id="tbl_judgeaddressgrid" class="table ew-table"><!-- .ew-table ##-->
<thead>
	<tr class="ew-table-header">
<?php

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

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

// Render list options (header, left)
$judgeaddress_grid->ListOptions->render("header", "left");
?>
<?php if ($judgeaddress->JudgeID->Visible) { // JudgeID ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->JudgeID) == "") { ?>
		<th data-name="JudgeID" class="<?php echo $judgeaddress->JudgeID->headerCellClass() ?>"><div id="elh_judgeaddress_JudgeID" class="judgeaddress_JudgeID"><div class="ew-table-header-caption"><?php echo $judgeaddress->JudgeID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="JudgeID" class="<?php echo $judgeaddress->JudgeID->headerCellClass() ?>"><div><div id="elh_judgeaddress_JudgeID" class="judgeaddress_JudgeID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->JudgeID->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->JudgeID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->JudgeID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->AddressTypeID) == "") { ?>
		<th data-name="AddressTypeID" class="<?php echo $judgeaddress->AddressTypeID->headerCellClass() ?>"><div id="elh_judgeaddress_AddressTypeID" class="judgeaddress_AddressTypeID"><div class="ew-table-header-caption"><?php echo $judgeaddress->AddressTypeID->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="AddressTypeID" class="<?php echo $judgeaddress->AddressTypeID->headerCellClass() ?>"><div><div id="elh_judgeaddress_AddressTypeID" class="judgeaddress_AddressTypeID">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->AddressTypeID->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->AddressTypeID->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->AddressTypeID->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Address->Visible) { // Address ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Address) == "") { ?>
		<th data-name="Address" class="<?php echo $judgeaddress->Address->headerCellClass() ?>"><div id="elh_judgeaddress_Address" class="judgeaddress_Address"><div class="ew-table-header-caption"><?php echo $judgeaddress->Address->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Address" class="<?php echo $judgeaddress->Address->headerCellClass() ?>"><div><div id="elh_judgeaddress_Address" class="judgeaddress_Address">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Address->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Address->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Address->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->City->Visible) { // City ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->City) == "") { ?>
		<th data-name="City" class="<?php echo $judgeaddress->City->headerCellClass() ?>"><div id="elh_judgeaddress_City" class="judgeaddress_City"><div class="ew-table-header-caption"><?php echo $judgeaddress->City->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="City" class="<?php echo $judgeaddress->City->headerCellClass() ?>"><div><div id="elh_judgeaddress_City" class="judgeaddress_City">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->City->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->City->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->City->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Region->Visible) { // Region ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Region) == "") { ?>
		<th data-name="Region" class="<?php echo $judgeaddress->Region->headerCellClass() ?>"><div id="elh_judgeaddress_Region" class="judgeaddress_Region"><div class="ew-table-header-caption"><?php echo $judgeaddress->Region->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Region" class="<?php echo $judgeaddress->Region->headerCellClass() ?>"><div><div id="elh_judgeaddress_Region" class="judgeaddress_Region">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Region->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Region->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Region->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->PostalCode->Visible) { // PostalCode ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->PostalCode) == "") { ?>
		<th data-name="PostalCode" class="<?php echo $judgeaddress->PostalCode->headerCellClass() ?>"><div id="elh_judgeaddress_PostalCode" class="judgeaddress_PostalCode"><div class="ew-table-header-caption"><?php echo $judgeaddress->PostalCode->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="PostalCode" class="<?php echo $judgeaddress->PostalCode->headerCellClass() ?>"><div><div id="elh_judgeaddress_PostalCode" class="judgeaddress_PostalCode">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->PostalCode->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->PostalCode->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->PostalCode->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Country->Visible) { // Country ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Country) == "") { ?>
		<th data-name="Country" class="<?php echo $judgeaddress->Country->headerCellClass() ?>"><div id="elh_judgeaddress_Country" class="judgeaddress_Country"><div class="ew-table-header-caption"><?php echo $judgeaddress->Country->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Country" class="<?php echo $judgeaddress->Country->headerCellClass() ?>"><div><div id="elh_judgeaddress_Country" class="judgeaddress_Country">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Country->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Country->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Country->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Notes->Visible) { // Notes ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Notes) == "") { ?>
		<th data-name="Notes" class="<?php echo $judgeaddress->Notes->headerCellClass() ?>"><div id="elh_judgeaddress_Notes" class="judgeaddress_Notes"><div class="ew-table-header-caption"><?php echo $judgeaddress->Notes->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Notes" class="<?php echo $judgeaddress->Notes->headerCellClass() ?>"><div><div id="elh_judgeaddress_Notes" class="judgeaddress_Notes">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Notes->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Notes->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Notes->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Primary->Visible) { // Primary ?>
	<?php if ($judgeaddress->sortUrl($judgeaddress->Primary) == "") { ?>
		<th data-name="Primary" class="<?php echo $judgeaddress->Primary->headerCellClass() ?>"><div id="elh_judgeaddress_Primary" class="judgeaddress_Primary"><div class="ew-table-header-caption"><?php echo $judgeaddress->Primary->caption() ?></div></div></th>
	<?php } else { ?>
		<th data-name="Primary" class="<?php echo $judgeaddress->Primary->headerCellClass() ?>"><div><div id="elh_judgeaddress_Primary" class="judgeaddress_Primary">
			<div class="ew-table-header-btn"><span class="ew-table-header-caption"><?php echo $judgeaddress->Primary->caption() ?></span><span class="ew-table-header-sort"><?php if ($judgeaddress->Primary->getSort() == "ASC") { ?><i class="fa fa-sort-up"></i><?php } elseif ($judgeaddress->Primary->getSort() == "DESC") { ?><i class="fa fa-sort-down"></i><?php } ?></span></div>
		</div></div></th>
	<?php } ?>
<?php } ?>
<?php

// Render list options (header, right)
$judgeaddress_grid->ListOptions->render("header", "right");
?>
	</tr>
</thead>
<tbody>
<?php
$judgeaddress_grid->StartRec = 1;
$judgeaddress_grid->StopRec = $judgeaddress_grid->TotalRecs; // Show all records

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

// Initialize aggregate
$judgeaddress->RowType = ROWTYPE_AGGREGATEINIT;
$judgeaddress->resetAttributes();
$judgeaddress_grid->renderRow();
if ($judgeaddress->isGridAdd())
	$judgeaddress_grid->RowIndex = 0;
if ($judgeaddress->isGridEdit())
	$judgeaddress_grid->RowIndex = 0;
while ($judgeaddress_grid->RecCnt < $judgeaddress_grid->StopRec) {
	$judgeaddress_grid->RecCnt++;
	if ($judgeaddress_grid->RecCnt >= $judgeaddress_grid->StartRec) {
		$judgeaddress_grid->RowCnt++;
		if ($judgeaddress->isGridAdd() || $judgeaddress->isGridEdit() || $judgeaddress->isConfirm()) {
			$judgeaddress_grid->RowIndex++;
			$CurrentForm->Index = $judgeaddress_grid->RowIndex;
			if ($CurrentForm->hasValue($judgeaddress_grid->FormActionName) && $judgeaddress_grid->EventCancelled)
				$judgeaddress_grid->RowAction = strval($CurrentForm->getValue($judgeaddress_grid->FormActionName));
			elseif ($judgeaddress->isGridAdd())
				$judgeaddress_grid->RowAction = "insert";
			else
				$judgeaddress_grid->RowAction = "";
		}

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

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

		// Set up row id / data-rowindex
		$judgeaddress->RowAttrs = array_merge($judgeaddress->RowAttrs, array('data-rowindex'=>$judgeaddress_grid->RowCnt, 'id'=>'r' . $judgeaddress_grid->RowCnt . '_judgeaddress', 'data-rowtype'=>$judgeaddress->RowType));

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

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

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

// Render list options (body, left)
$judgeaddress_grid->ListOptions->render("body", "left", $judgeaddress_grid->RowCnt);
?>
	<?php if ($judgeaddress->JudgeID->Visible) { // JudgeID ?>
		<td data-name="JudgeID"<?php echo $judgeaddress->JudgeID->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<?php if ($judgeaddress->JudgeID->getSessionValue() <> "") { ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_JudgeID" class="form-group judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->JudgeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_JudgeID" class="form-group judgeaddress_JudgeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_JudgeID" data-value-separator="<?php echo $judgeaddress->JudgeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID"<?php echo $judgeaddress->JudgeID->editAttributes() ?>>
		<?php echo $judgeaddress->JudgeID->selectOptionListHtml("x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID") ?>
	</select>
</div>
<?php echo $judgeaddress->JudgeID->Lookup->getParamTag("p_x" . $judgeaddress_grid->RowIndex . "_JudgeID") ?>
</span>
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_JudgeID" name="o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" id="o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php if ($judgeaddress->JudgeID->getSessionValue() <> "") { ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_JudgeID" class="form-group judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->JudgeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_JudgeID" class="form-group judgeaddress_JudgeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_JudgeID" data-value-separator="<?php echo $judgeaddress->JudgeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID"<?php echo $judgeaddress->JudgeID->editAttributes() ?>>
		<?php echo $judgeaddress->JudgeID->selectOptionListHtml("x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID") ?>
	</select>
</div>
<?php echo $judgeaddress->JudgeID->Lookup->getParamTag("p_x" . $judgeaddress_grid->RowIndex . "_JudgeID") ?>
</span>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_JudgeID" class="judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<?php echo $judgeaddress->JudgeID->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_JudgeID" name="o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" id="o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_JudgeID" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_JudgeID" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<input type="hidden" data-table="judgeaddress" data-field="x_AddressID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressID" id="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressID" value="<?php echo HtmlEncode($judgeaddress->AddressID->CurrentValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_AddressID" name="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressID" id="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressID" value="<?php echo HtmlEncode($judgeaddress->AddressID->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT || $judgeaddress->CurrentMode == "edit") { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_AddressID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressID" id="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressID" value="<?php echo HtmlEncode($judgeaddress->AddressID->CurrentValue) ?>">
<?php } ?>
	<?php if ($judgeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<td data-name="AddressTypeID"<?php echo $judgeaddress->AddressTypeID->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_AddressTypeID" class="form-group judgeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $judgeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID"<?php echo $judgeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $judgeaddress->AddressTypeID->selectOptionListHtml("x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID") ?>
	</select>
</div>
<?php echo $judgeaddress->AddressTypeID->Lookup->getParamTag("p_x" . $judgeaddress_grid->RowIndex . "_AddressTypeID") ?>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_AddressTypeID" name="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" id="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($judgeaddress->AddressTypeID->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_AddressTypeID" class="form-group judgeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $judgeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID"<?php echo $judgeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $judgeaddress->AddressTypeID->selectOptionListHtml("x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID") ?>
	</select>
</div>
<?php echo $judgeaddress->AddressTypeID->Lookup->getParamTag("p_x" . $judgeaddress_grid->RowIndex . "_AddressTypeID") ?>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_AddressTypeID" class="judgeaddress_AddressTypeID">
<span<?php echo $judgeaddress->AddressTypeID->viewAttributes() ?>>
<?php echo $judgeaddress->AddressTypeID->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_AddressTypeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" id="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($judgeaddress->AddressTypeID->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_AddressTypeID" name="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" id="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($judgeaddress->AddressTypeID->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_AddressTypeID" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($judgeaddress->AddressTypeID->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_AddressTypeID" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($judgeaddress->AddressTypeID->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Address->Visible) { // Address ?>
		<td data-name="Address"<?php echo $judgeaddress->Address->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Address" class="form-group judgeaddress_Address">
<input type="text" data-table="judgeaddress" data-field="x_Address" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($judgeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Address->EditValue ?>"<?php echo $judgeaddress->Address->editAttributes() ?>>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Address" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($judgeaddress->Address->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Address" class="form-group judgeaddress_Address">
<input type="text" data-table="judgeaddress" data-field="x_Address" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($judgeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Address->EditValue ?>"<?php echo $judgeaddress->Address->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Address" class="judgeaddress_Address">
<span<?php echo $judgeaddress->Address->viewAttributes() ?>>
<?php echo $judgeaddress->Address->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Address" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($judgeaddress->Address->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Address" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($judgeaddress->Address->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Address" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($judgeaddress->Address->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Address" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($judgeaddress->Address->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($judgeaddress->City->Visible) { // City ?>
		<td data-name="City"<?php echo $judgeaddress->City->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_City" class="form-group judgeaddress_City">
<input type="text" data-table="judgeaddress" data-field="x_City" name="x<?php echo $judgeaddress_grid->RowIndex ?>_City" id="x<?php echo $judgeaddress_grid->RowIndex ?>_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->City->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->City->EditValue ?>"<?php echo $judgeaddress->City->editAttributes() ?>>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_City" name="o<?php echo $judgeaddress_grid->RowIndex ?>_City" id="o<?php echo $judgeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($judgeaddress->City->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_City" class="form-group judgeaddress_City">
<input type="text" data-table="judgeaddress" data-field="x_City" name="x<?php echo $judgeaddress_grid->RowIndex ?>_City" id="x<?php echo $judgeaddress_grid->RowIndex ?>_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->City->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->City->EditValue ?>"<?php echo $judgeaddress->City->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_City" class="judgeaddress_City">
<span<?php echo $judgeaddress->City->viewAttributes() ?>>
<?php echo $judgeaddress->City->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_City" name="x<?php echo $judgeaddress_grid->RowIndex ?>_City" id="x<?php echo $judgeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($judgeaddress->City->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_City" name="o<?php echo $judgeaddress_grid->RowIndex ?>_City" id="o<?php echo $judgeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($judgeaddress->City->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_City" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_City" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($judgeaddress->City->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_City" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_City" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($judgeaddress->City->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Region->Visible) { // Region ?>
		<td data-name="Region"<?php echo $judgeaddress->Region->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Region" class="form-group judgeaddress_Region">
<input type="text" data-table="judgeaddress" data-field="x_Region" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Region->EditValue ?>"<?php echo $judgeaddress->Region->editAttributes() ?>>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Region" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($judgeaddress->Region->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Region" class="form-group judgeaddress_Region">
<input type="text" data-table="judgeaddress" data-field="x_Region" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Region->EditValue ?>"<?php echo $judgeaddress->Region->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Region" class="judgeaddress_Region">
<span<?php echo $judgeaddress->Region->viewAttributes() ?>>
<?php echo $judgeaddress->Region->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Region" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($judgeaddress->Region->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Region" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($judgeaddress->Region->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Region" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($judgeaddress->Region->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Region" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($judgeaddress->Region->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($judgeaddress->PostalCode->Visible) { // PostalCode ?>
		<td data-name="PostalCode"<?php echo $judgeaddress->PostalCode->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_PostalCode" class="form-group judgeaddress_PostalCode">
<input type="text" data-table="judgeaddress" data-field="x_PostalCode" name="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($judgeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->PostalCode->EditValue ?>"<?php echo $judgeaddress->PostalCode->editAttributes() ?>>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_PostalCode" name="o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($judgeaddress->PostalCode->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_PostalCode" class="form-group judgeaddress_PostalCode">
<input type="text" data-table="judgeaddress" data-field="x_PostalCode" name="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($judgeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->PostalCode->EditValue ?>"<?php echo $judgeaddress->PostalCode->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_PostalCode" class="judgeaddress_PostalCode">
<span<?php echo $judgeaddress->PostalCode->viewAttributes() ?>>
<?php echo $judgeaddress->PostalCode->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_PostalCode" name="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($judgeaddress->PostalCode->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_PostalCode" name="o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($judgeaddress->PostalCode->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_PostalCode" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($judgeaddress->PostalCode->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_PostalCode" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($judgeaddress->PostalCode->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Country->Visible) { // Country ?>
		<td data-name="Country"<?php echo $judgeaddress->Country->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Country" class="form-group judgeaddress_Country">
<input type="text" data-table="judgeaddress" data-field="x_Country" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($judgeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Country->EditValue ?>"<?php echo $judgeaddress->Country->editAttributes() ?>>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Country" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($judgeaddress->Country->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Country" class="form-group judgeaddress_Country">
<input type="text" data-table="judgeaddress" data-field="x_Country" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($judgeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Country->EditValue ?>"<?php echo $judgeaddress->Country->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Country" class="judgeaddress_Country">
<span<?php echo $judgeaddress->Country->viewAttributes() ?>>
<?php echo $judgeaddress->Country->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Country" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($judgeaddress->Country->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Country" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($judgeaddress->Country->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Country" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($judgeaddress->Country->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Country" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($judgeaddress->Country->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Notes->Visible) { // Notes ?>
		<td data-name="Notes"<?php echo $judgeaddress->Notes->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Notes" class="form-group judgeaddress_Notes">
<input type="text" data-table="judgeaddress" data-field="x_Notes" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($judgeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Notes->EditValue ?>"<?php echo $judgeaddress->Notes->editAttributes() ?>>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Notes" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($judgeaddress->Notes->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Notes" class="form-group judgeaddress_Notes">
<input type="text" data-table="judgeaddress" data-field="x_Notes" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($judgeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Notes->EditValue ?>"<?php echo $judgeaddress->Notes->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Notes" class="judgeaddress_Notes">
<span<?php echo $judgeaddress->Notes->viewAttributes() ?>>
<?php echo $judgeaddress->Notes->getViewValue() ?></span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Notes" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($judgeaddress->Notes->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Notes" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($judgeaddress->Notes->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Notes" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($judgeaddress->Notes->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Notes" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($judgeaddress->Notes->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
	<?php if ($judgeaddress->Primary->Visible) { // Primary ?>
		<td data-name="Primary"<?php echo $judgeaddress->Primary->cellAttributes() ?>>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Primary" class="form-group judgeaddress_Primary">
<?php
$selwrk = (ConvertToBool($judgeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="judgeaddress" data-field="x_Primary" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" value="1"<?php echo $selwrk ?><?php echo $judgeaddress->Primary->editAttributes() ?>>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Primary" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($judgeaddress->Primary->OldValue) ?>">
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Primary" class="form-group judgeaddress_Primary">
<?php
$selwrk = (ConvertToBool($judgeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="judgeaddress" data-field="x_Primary" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" value="1"<?php echo $selwrk ?><?php echo $judgeaddress->Primary->editAttributes() ?>>
</span>
<?php } ?>
<?php if ($judgeaddress->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?php echo $judgeaddress_grid->RowCnt ?>_judgeaddress_Primary" class="judgeaddress_Primary">
<span<?php echo $judgeaddress->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($judgeaddress->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $judgeaddress->Primary->getViewValue() ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $judgeaddress->Primary->getViewValue() ?>" disabled>
<?php } ?>
</span>
</span>
<?php if (!$judgeaddress->isConfirm()) { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Primary" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary" value="<?php echo HtmlEncode($judgeaddress->Primary->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Primary" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($judgeaddress->Primary->OldValue) ?>">
<?php } else { ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Primary" name="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Primary" id="fjudgeaddressgrid$x<?php echo $judgeaddress_grid->RowIndex ?>_Primary" value="<?php echo HtmlEncode($judgeaddress->Primary->FormValue) ?>">
<input type="hidden" data-table="judgeaddress" data-field="x_Primary" name="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" id="fjudgeaddressgrid$o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($judgeaddress->Primary->OldValue) ?>">
<?php } ?>
<?php } ?>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$judgeaddress_grid->ListOptions->render("body", "right", $judgeaddress_grid->RowCnt);
?>
	</tr>
<?php if ($judgeaddress->RowType == ROWTYPE_ADD || $judgeaddress->RowType == ROWTYPE_EDIT) { ?>
<script>
fjudgeaddressgrid.updateLists(<?php echo $judgeaddress_grid->RowIndex ?>);
</script>
<?php } ?>
<?php
	}
	} // End delete row checking
	if (!$judgeaddress->isGridAdd() || $judgeaddress->CurrentMode == "copy")
		if (!$judgeaddress_grid->Recordset->EOF)
			$judgeaddress_grid->Recordset->moveNext();
}
?>
<?php
	if ($judgeaddress->CurrentMode == "add" || $judgeaddress->CurrentMode == "copy" || $judgeaddress->CurrentMode == "edit") {
		$judgeaddress_grid->RowIndex = '$rowindex$';
		$judgeaddress_grid->loadRowValues();

		// Set row properties
		$judgeaddress->resetAttributes();
		$judgeaddress->RowAttrs = array_merge($judgeaddress->RowAttrs, array('data-rowindex'=>$judgeaddress_grid->RowIndex, 'id'=>'r0_judgeaddress', 'data-rowtype'=>ROWTYPE_ADD));
		AppendClass($judgeaddress->RowAttrs["class"], "ew-template");
		$judgeaddress->RowType = ROWTYPE_ADD;

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

		// Render list options
		$judgeaddress_grid->renderListOptions();
		$judgeaddress_grid->StartRowCnt = 0;
?>
	<tr<?php echo $judgeaddress->rowAttributes() ?>>
<?php

// Render list options (body, left)
$judgeaddress_grid->ListOptions->render("body", "left", $judgeaddress_grid->RowIndex);
?>
	<?php if ($judgeaddress->JudgeID->Visible) { // JudgeID ?>
		<td data-name="JudgeID">
<?php if (!$judgeaddress->isConfirm()) { ?>
<?php if ($judgeaddress->JudgeID->getSessionValue() <> "") { ?>
<span id="el$rowindex$_judgeaddress_JudgeID" class="form-group judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->JudgeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_JudgeID" class="form-group judgeaddress_JudgeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_JudgeID" data-value-separator="<?php echo $judgeaddress->JudgeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID"<?php echo $judgeaddress->JudgeID->editAttributes() ?>>
		<?php echo $judgeaddress->JudgeID->selectOptionListHtml("x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID") ?>
	</select>
</div>
<?php echo $judgeaddress->JudgeID->Lookup->getParamTag("p_x" . $judgeaddress_grid->RowIndex . "_JudgeID") ?>
</span>
<?php } ?>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_JudgeID" class="form-group judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->JudgeID->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_JudgeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" id="x<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_JudgeID" name="o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" id="o<?php echo $judgeaddress_grid->RowIndex ?>_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
		<td data-name="AddressTypeID">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_AddressTypeID" class="form-group judgeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $judgeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID"<?php echo $judgeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $judgeaddress->AddressTypeID->selectOptionListHtml("x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID") ?>
	</select>
</div>
<?php echo $judgeaddress->AddressTypeID->Lookup->getParamTag("p_x" . $judgeaddress_grid->RowIndex . "_AddressTypeID") ?>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_AddressTypeID" class="form-group judgeaddress_AddressTypeID">
<span<?php echo $judgeaddress->AddressTypeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->AddressTypeID->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_AddressTypeID" name="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" id="x<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($judgeaddress->AddressTypeID->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_AddressTypeID" name="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" id="o<?php echo $judgeaddress_grid->RowIndex ?>_AddressTypeID" value="<?php echo HtmlEncode($judgeaddress->AddressTypeID->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->Address->Visible) { // Address ?>
		<td data-name="Address">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_Address" class="form-group judgeaddress_Address">
<input type="text" data-table="judgeaddress" data-field="x_Address" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($judgeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Address->EditValue ?>"<?php echo $judgeaddress->Address->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_Address" class="form-group judgeaddress_Address">
<span<?php echo $judgeaddress->Address->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->Address->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Address" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($judgeaddress->Address->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Address" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Address" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Address" value="<?php echo HtmlEncode($judgeaddress->Address->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->City->Visible) { // City ?>
		<td data-name="City">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_City" class="form-group judgeaddress_City">
<input type="text" data-table="judgeaddress" data-field="x_City" name="x<?php echo $judgeaddress_grid->RowIndex ?>_City" id="x<?php echo $judgeaddress_grid->RowIndex ?>_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->City->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->City->EditValue ?>"<?php echo $judgeaddress->City->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_City" class="form-group judgeaddress_City">
<span<?php echo $judgeaddress->City->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->City->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_City" name="x<?php echo $judgeaddress_grid->RowIndex ?>_City" id="x<?php echo $judgeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($judgeaddress->City->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_City" name="o<?php echo $judgeaddress_grid->RowIndex ?>_City" id="o<?php echo $judgeaddress_grid->RowIndex ?>_City" value="<?php echo HtmlEncode($judgeaddress->City->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->Region->Visible) { // Region ?>
		<td data-name="Region">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_Region" class="form-group judgeaddress_Region">
<input type="text" data-table="judgeaddress" data-field="x_Region" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Region->EditValue ?>"<?php echo $judgeaddress->Region->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_Region" class="form-group judgeaddress_Region">
<span<?php echo $judgeaddress->Region->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->Region->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Region" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($judgeaddress->Region->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Region" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Region" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Region" value="<?php echo HtmlEncode($judgeaddress->Region->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->PostalCode->Visible) { // PostalCode ?>
		<td data-name="PostalCode">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_PostalCode" class="form-group judgeaddress_PostalCode">
<input type="text" data-table="judgeaddress" data-field="x_PostalCode" name="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($judgeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->PostalCode->EditValue ?>"<?php echo $judgeaddress->PostalCode->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_PostalCode" class="form-group judgeaddress_PostalCode">
<span<?php echo $judgeaddress->PostalCode->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->PostalCode->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_PostalCode" name="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="x<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($judgeaddress->PostalCode->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_PostalCode" name="o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" id="o<?php echo $judgeaddress_grid->RowIndex ?>_PostalCode" value="<?php echo HtmlEncode($judgeaddress->PostalCode->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->Country->Visible) { // Country ?>
		<td data-name="Country">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_Country" class="form-group judgeaddress_Country">
<input type="text" data-table="judgeaddress" data-field="x_Country" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($judgeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Country->EditValue ?>"<?php echo $judgeaddress->Country->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_Country" class="form-group judgeaddress_Country">
<span<?php echo $judgeaddress->Country->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->Country->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Country" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($judgeaddress->Country->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Country" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Country" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Country" value="<?php echo HtmlEncode($judgeaddress->Country->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->Notes->Visible) { // Notes ?>
		<td data-name="Notes">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_Notes" class="form-group judgeaddress_Notes">
<input type="text" data-table="judgeaddress" data-field="x_Notes" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($judgeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Notes->EditValue ?>"<?php echo $judgeaddress->Notes->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_Notes" class="form-group judgeaddress_Notes">
<span<?php echo $judgeaddress->Notes->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->Notes->ViewValue) ?>"></span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Notes" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($judgeaddress->Notes->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Notes" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Notes" value="<?php echo HtmlEncode($judgeaddress->Notes->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($judgeaddress->Primary->Visible) { // Primary ?>
		<td data-name="Primary">
<?php if (!$judgeaddress->isConfirm()) { ?>
<span id="el$rowindex$_judgeaddress_Primary" class="form-group judgeaddress_Primary">
<?php
$selwrk = (ConvertToBool($judgeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="judgeaddress" data-field="x_Primary" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" value="1"<?php echo $selwrk ?><?php echo $judgeaddress->Primary->editAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_judgeaddress_Primary" class="form-group judgeaddress_Primary">
<span<?php echo $judgeaddress->Primary->viewAttributes() ?>>
<?php if (ConvertToBool($judgeaddress->Primary->CurrentValue)) { ?>
<input type="checkbox" value="<?php echo $judgeaddress->Primary->ViewValue ?>" disabled checked>
<?php } else { ?>
<input type="checkbox" value="<?php echo $judgeaddress->Primary->ViewValue ?>" disabled>
<?php } ?>
</span>
</span>
<input type="hidden" data-table="judgeaddress" data-field="x_Primary" name="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary" id="x<?php echo $judgeaddress_grid->RowIndex ?>_Primary" value="<?php echo HtmlEncode($judgeaddress->Primary->FormValue) ?>">
<?php } ?>
<input type="hidden" data-table="judgeaddress" data-field="x_Primary" name="o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" id="o<?php echo $judgeaddress_grid->RowIndex ?>_Primary[]" value="<?php echo HtmlEncode($judgeaddress->Primary->OldValue) ?>">
</td>
	<?php } ?>
<?php

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

// Close recordset
if ($judgeaddress_grid->Recordset)
	$judgeaddress_grid->Recordset->Close();
?>
</div>
<?php if ($judgeaddress_grid->ShowOtherOptions) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php $judgeaddress_grid->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($judgeaddress_grid->TotalRecs == 0 && !$judgeaddress->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $judgeaddress_grid->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php
$judgeaddress_grid->terminate();
?>
<?php if (!$judgeaddress->isExport()) { ?>
<script>
ew.scrollableTable("gmp_judgeaddress", "", "");
</script>
<?php } ?>
