This is a migrated thread and some comments may be shown as answers.

Problem with 100% height for a RadGrid in a UserControl

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cloud
Top achievements
Rank 1
Cloud asked on 07 Aug 2012, 09:22 AM
i read the thread about the 100% height for RadGrid in a user control below:
 http://www.telerik.com/community/forums/aspnet-ajax/grid/problem-with-100-height-for-a-radgrid-in-a-usercontrol.aspx

I have the same problem for my asp.net product (the grid cannot 100% height inside the control with RadAjaxManagerProxy. there is no problem if the RadAjaxManagerProxy is not exist). i create a standard aspx page with user control .
the user control have a radsplitter and there is a radgrid inside the radsplitter.

I tried the solution with the followig but it still not work. i don't know is there anything wrong with my aspx. i enclosed my aspx and ascx for you to check. thks!

http://www.telerik.com/community/code-library/aspnet-ajax/ajax/how-to-set-100-height-and-random-styles-to-a-radajaxmanager-update-panel.aspx

private void AjaxSettingCreated(object sender, AjaxSettingCreatedEventArgs e)
{
    if (e.Updated.ID == "grdInstruction")
    {
        this.grdInstructionClientID = e.UpdatePanel.ClientID;
    }
}


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="InstructionSearchResultCtl.ascx.cs" Inherits="Control_ListingControl_InstructionSearchResultCtl" %>
<%@ Register src="~/Control/ToolTipsCtl.ascx" tagname="ToolTipsCtl" tagprefix="uc1" %>
  
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<style type="text/css">
#<%= grdInstructionClientID %>
{
    margin:0;
    height:100%;
}
  
</style>
  
<script type="text/javascript" src="../js/Session.js"></script>
<script language="javascript" type="text/javascript">
  
    function rtbStockMenu_OnClientButtonClicking_<%= this.ctlID %>(sender, eventArgs) {
        var item = eventArgs.get_item();
  
        var selectedUnitId = "";
        var url = "";
        var WinSettings = "";
  
        for (i in selected) {
            if (selected[i]) {
                selectedUnitId += i + "!";
            }
        }
  
        if (item.get_value() == "Report") {
  
            if (selectedUnitId != "") {
                var fldSelectedIdList = document.getElementById("<%= fldSelectedIdList.ClientID %>");
                fldSelectedIdList.value = selectedUnitId;
            } else {
                eventArgs.set_cancel(true);
            }
  
        } else if (item.get_value() == "Fav_Add") {
            if (selectedUnitId != "") {
                var fldSelectedIdList = document.getElementById("<%= fldSelectedIdList.ClientID %>");
                fldSelectedIdList.value = selectedUnitId;
            } else {
                eventArgs.set_cancel(true);
            }
        }
        else if (item.get_value() == "Fav_Remove") {
            if (selectedUnitId != "") {
                var fldSelectedIdList = document.getElementById("<%= fldSelectedIdList.ClientID %>");
                fldSelectedIdList.value = selectedUnitId;
            } else {
                eventArgs.set_cancel(true);
            }
        } else if (item.get_value() == "UploadProfilePicture") {
            url = "./EditForm/UploadFile.aspx";
            WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
            var returnValue = window.showModalDialog(url, null, WinSettings);
  
        } else if (item.get_value() == "CreateOwnerTenure") {
            var url = "";
            var grid = $find("<%=grdInstruction.ClientID %>");
            var gridDataItem = grid.get_masterTableView().get_selectedItems();
            var row = gridDataItem[0];
  
            WinSettings = "center:yes;resizable:no;dialogHeight:600px;dialogWidth=700px";
            if (selectedUnitId != "") {
  
                PageMethods.SetSessionValue("IdList", selectedUnitId, OnSucceeded, OnFailed);
                url = "./EditForm/Edit_Tenure_Owner.aspx?Action=CreateOwnerTenure&FromCond=FromStock";
                setCookie_<%= this.ctlID %>('RecordIdList', getSelectedUnitIdList_<%= this.ctlID %>(), 365);
                ShowPopUpURL_<%= this.ctlID %>(url, WinSettings, eventArgs);
            }
        } else if (item.get_value() == "CreateLeaseTenure" || item.get_value() == "TerminateLeaseTenure" || item.get_value() == "UpdateLeaseTenure" || item.get_value() == "RelocationLeaseTenure" || item.get_value() == "RenewLeaseTenure") {
            var url = "";
            var grid = $find("<%=grdInstruction.ClientID %>");
            var gridDataItem = grid.get_masterTableView().get_selectedItems();
            var row = gridDataItem[0];
  
            WinSettings = "center:yes;resizable:no;dialogHeight:600px;dialogWidth=700px";
            if (selectedUnitId != "") {
  
                PageMethods.SetSessionValue("IdList", selectedUnitId, OnSucceeded, OnFailed);
  
                if (item.get_value() == "CreateLeaseTenure") {
                    url = "./EditForm/Edit_Tenure_Lease.aspx?Action=CreateLeaseTenure&FromCond=FromStock";
                } else if (item.get_value() == "TerminateLeaseTenure") {
                    url = "./EditForm/Edit_Tenure_Lease.aspx?Action=TerminateLeaseTenure&FromCond=FromStock";
                } else if (item.get_value() == "UpdateLeaseTenure") {
                    url = "./EditForm/Edit_Tenure_Lease.aspx?Action=UpdateLeaseTenure&FromCond=FromStock";
                } else if (item.get_value() == "RelocationLeaseTenure") {
                    url = "./EditForm/Edit_Tenure_Lease.aspx?Action=RelocationLeaseTenure&FromCond=FromStock";
                }
                setCookie_<%= this.ctlID %>('RecordIdList', getSelectedUnitIdList_<%= this.ctlID %>(), 365);
                ShowPopUpURL_<%= this.ctlID %>(url, WinSettings, eventArgs);
            }
        } else if (item.get_value() == "TransactionSaleSearch") {
            var url = "./EditForm/Edit_MySearch.aspx?Menu=transaction&SessionTime=" + sessionTime + "&PopUp=1&showSearchPane=1&multiLocationList=" + getSelectedPropertyList_<%= this.ctlID %>();
            WinSettings = "left=0,top=0,width=" + (screen.availWidth - 18) + ",height=" + (screen.availHeight - 50) + " ,toolbar=no, location=no,directories=yes,status=no,menubar=no,scrollbars=no,copyhistory=yes, resizable=yes";
  
            setCookie_<%= this.ctlID %>('RecordIdList', getSelectedMultiLocationList_<%= this.ctlID %>(), 365);
  
            var now = new Date();
            var hour = now.getHours();
            var minute = now.getMinutes();
            var second = now.getSeconds();
            var monthnumber = now.getMonth();
            var monthday = now.getDate();
            var year = now.getYear();
            window.open(url, "" + year + "" + monthnumber + "" + monthday + "" + hour + "" + minute + "" + second, WinSettings);
        }
        else {
  
            if (item.get_value() == "Email" || item.get_value() == "EditPrice" || item.get_value() == "EditMemo"
                    || item.get_value() == "EditInActivate" || item.get_value() == "EditStock"
                    || item.get_value() == "EditOwner" || item.get_value() == "EditInternalRemarks" || item.get_value() == "EditEAA" || item.get_value() == "EditViewingContact") {
                var grid = $find("<%=grdInstruction.ClientID %>");
                var gridDataItem = grid.get_masterTableView().get_selectedItems();
                if (gridDataItem.length < 1) {
                    alert('No Record selected');
                    eventArgs.set_cancel(true);
                } else {
  
                    if (item.get_value() == "Email") {
  
  
                        if (selectedUnitId != "") {
                            PageMethods.SetSessionValue("IdList", selectedUnitId, SendEmail, OnFailed);
                        }
                        else {
                            eventArgs.set_cancel(true);
                        }
  
                    } else {
                        var row = gridDataItem[0];
                        var unitId = row.getDataKeyValue("Unit_Id");
                        var instructionId = row.getDataKeyValue("Instruction_Id");
                        var url = "";
  
                        WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
                        if (item.get_value() == "EditPrice" || item.get_value() == "EditMemo" || item.get_value() == "EditEAA" || item.get_value() == "EditInternalRemarks" || item.get_value() == "EditViewingContact") {
                            url = "./EditForm/Edit_Instruction.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                            WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
                        } else if (item.get_value() == "EditInActivate") {
                            if (instructionId != "") {
                                url = "./EditForm/Edit_Instruction.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                                WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
                            }
                        } else if (item.get_value() == "EditStock") {
                            url = "./EditForm/Edit_Instruction_Full.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                            WinSettings = "center:yes;resizable:no;dialogHeight:700px;dialogWidth=950px;scroll:no";
                        } else if (item.get_value() == "EditOwner") {
                            url = "./EditForm/Edit_Instruction.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                            WinSettings = "center:yes;resizable:no;dialogHeight:500px;dialogWidth=600px";
                        }
                        ShowPopUpURL_<%= this.ctlID %>(url, WinSettings, eventArgs);
                    }
                }
            }
        }
    }
  
  
    //--------------------------Navigation bar------------------------------------------
    function cboPropertyLocator_OnClientSelectedIndexChanged_<%= this.ctlID %>(sender, eventArgs) {
        resetSelection_<%= this.ctlID %>();
    }
  
  
    function lbtnLocator_OnClientClick_<%= this.ctlID %>() {
  
        resetSelection_<%= this.ctlID %>();
    }
  
    function cboBound5Locator_OnClientSelectedIndexChanged_<%= this.ctlID %>(sender, eventArgs) {
        resetSelection_<%= this.ctlID %>();
    }
  
    function cboPropertyLocator2_OnClientSelectedIndexChanged_<%= this.ctlID %>(sender, eventArgs) {
        resetSelection_<%= this.ctlID %>();
    }
  
  
    function cboBuildingLocator_OnClientSelectedIndexChanged_<%= this.ctlID %>(sender, eventArgs) {
        resetSelection_<%= this.ctlID %>();
    }
  
      
    function cboUnitLocator_OnClientSelectedIndexChanged_<%= this.ctlID %>(sender, eventArgs) {
  
        var cboUnitLocator = $find("<%= cboUnitLocator.ClientID %>");
        var recordId = cboUnitLocator.get_value();
        ShowPopupRecord_<%= this.ctlID %>(recordId);
    }
  
  
    //----------------------------------------------------------------------------------------
  
  
    function mnuInstructionAction_OnClientItemClicking_<%= this.ctlID %>(sender, eventArgs) {
  
        sender.close();
        var item = eventArgs.get_item();
        var selectedUnitId = "";
        var url = "";
        var WinSettings = "";
  
        for (i in selected) {
            if (selected[i]) {
                selectedUnitId += i + "!";
            }
        }
  
        if (item.get_value() == "Report") {
  
            if (selectedUnitId != "") {
                var fldSelectedIdList = document.getElementById("<%= fldSelectedIdList.ClientID %>");
                fldSelectedIdList.value = selectedUnitId;
            } else {
                eventArgs.set_cancel(true);
            }
        }
        else if (item.get_value() == "UploadProfilePicture") {
            url = "./EditForm/UploadFile.aspx";
            WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
            var returnValue = window.showModalDialog(url, null, WinSettings);
  
        }
        else {
            if (item.get_value() == "EditPrice" || item.get_value() == "EditMemo"
                        || item.get_value() == "EditInActivate" || item.get_value() == "EditStock"
                        || item.get_value() == "EditOwner" || item.get_value() == "EditInternalRemarks" || item.get_value() == "EditEAA" || item.get_value() == "EditViewingContact") {
                var grid = $find("<%=grdInstruction.ClientID %>")
                var gridDataItem = grid.get_masterTableView().get_selectedItems();
                if (gridDataItem.length < 1) {
                    alert('No stock selected');
                    eventArgs.set_cancel(true);
                } else {
                    var row = gridDataItem[0];
                    var unitId = row.getDataKeyValue("Unit_Id");
                    var instructionId = row.getDataKeyValue("Instruction_Id");
  
  
                    WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
                    if (item.get_value() == "EditPrice" || item.get_value() == "EditMemo" || item.get_value() == "EditEAA" || item.get_value() == "EditInternalRemarks" || item.get_value() == "EditViewingContact") {
                        url = "./EditForm/Edit_Instruction.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                        WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
                    } else if (item.get_value() == "EditInActivate") {
                        if (instructionId != "") {
                            url = "./EditForm/Edit_Instruction.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                            WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=500px";
                        }
                    } else if (item.get_value() == "EditStock") {
                        url = "./EditForm/Edit_Instruction_Full.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                        WinSettings = "center:yes;resizable:no;dialogHeight:700px;dialogWidth=900px;scroll:no";
                    } else if (item.get_value() == "EditOwner") {
                        url = "./EditForm/Edit_Instruction.aspx?RecordId=" + unitId + "&InstructionId=" + instructionId + "&EditMode=" + item.get_value() + "&SessionTime=" + sessionTime;
                        WinSettings = "center:yes;resizable:no;dialogHeight:500px;dialogWidth=600px";
                    }
                    if (url != "") {
                        var returnValue = window.showModalDialog(url, null, WinSettings);
                        if (returnValue == true) {
                            ReloadPanel("RadSplitter_Stock", "RadPane_StockDetail");
                        }
                        else {
                            eventArgs.set_cancel(true);
                        }
                    }
                }
            }
        }
  
  
  
    }
  
</script>
<script language="javascript" type="text/javascript">
    var sessionTime = "<%= this.sessionTime %>";
    var selected = {};
    var selectedBuilding = {};
    var selectedProperty = {};
    var selectedCnt = 0;
    var selectedInstructionCnt = 0;
    var selectedBuildingCnt = 0;
  
  
  
    function getSelectedUnitIdList_<%= this.ctlID %>() {
        var selectedUnitId = "";
        for (i in selected) {
            if (selected[i]) {
                selectedUnitId += i + "!";
            }
        }
        return selectedUnitId;
    }
  
    function getSelectedMultiLocationList_<%= this.ctlID %>() {
        var selectedBuildingId = "";
        for (i in selectedBuilding) {
            if (selectedBuilding[i]) {
                selectedBuildingId += "Building/" + i + ",";
            }
        }
        return selectedBuildingId;
    }
  
    function getSelectedPropertyList_<%= this.ctlID %>() {
        var selectedPropertyId = "";
        for (i in selectedProperty) {
            if (selectedProperty[i]) {
                selectedPropertyId += "Property/" + i + ",";
            }
        }
        return selectedPropertyId;
    }
  
    function setCookie_<%= this.ctlID %>(c_name, value, exdays) {
        var exdate = new Date();
        exdate.setDate(exdate.getDate() + exdays);
        var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString() + ";path=/");
        document.cookie = c_name + "=" + c_value;
    }
  
//    function getCookie(c_name) {
//        var i, x, y, ARRcookies = document.cookie.split(";");
//        for (i = 0; i < ARRcookies.length; i++) {
//            x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
//            y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
//            x = x.replace(/^\s+|\s+$/g, "");
//            if (x == c_name) {
//                return unescape(y);
//            }
//        }
//    }
  
  
  
  
//    function GetSelectedUnitId() {
//        var grid = $find("<%=grdInstruction.ClientID %>");
//        var MasterTable = grid.get_masterTableView();
  
//        var selectedRows = MasterTable.get_selectedItems();
//        var idStr = "";
//        for (var i = 0; i < selectedRows.length; i++) {
//            var row = selectedRows[i];
//            var unitId = row.getDataKeyValue("Unit_Id");
//            idStr = idStr + unitId + "!";
//        }
//        return idStr;
//    }
  
  
    function resetSelection_<%= this.ctlID %>() {
        selected = {};
        selectedCnt = 0;
        selectedInstructionCnt = 0;
        enableToolBarButton_<%= this.ctlID %>(false, false);
    }
  
  
    function ShowPopupRecord_<%= this.ctlID %>(recordId) {
        var url = "./EditForm/View_Instruction.aspx?RecordId=" + recordId + "&SessionTime=" + sessionTime + "&PopUp=1";
        var WinSettings = "left=2,top=2,width=" + (screen.availWidth - 18) + ",height=" + (screen.availHeight - 50) + ",toolbar=no, location=no,directories=yes,status=no,menubar=no,scrollbars=no,copyhistory=yes, resizable=yes";
        var now = new Date();
        var hour = now.getHours();
        var minute = now.getMinutes();
        var second = now.getSeconds();
        var monthnumber = now.getMonth();
        var monthday = now.getDate();
        var year = now.getYear();
        window.open(url, "" + year + "" + monthnumber + "" + monthday + "" + hour + "" + minute + "" + second, WinSettings);
    }
  
    function ShowRecord(recordId) {
        var splitterPageWnd = window.parent;
        if (splitterPageWnd) {
            splitterPageWnd.setPaneUrl("./EditForm/View_Instruction.aspx?RecordId=" + recordId + "&SessionTime=" + sessionTime, "RadSplitter_Stock", "RadPane_StockDetail");
        }
    }
  
    function ShowPopupRecord_Building_<%= this.ctlID %>(recordId) {
        var url = "./EditForm/View_Building_Info.aspx?BuildingId=" + recordId + "&PopUp=1";
        var WinSettings = "left=2,top=2,width=" + (screen.availWidth - 18) + ",height=" + (screen.availHeight - 50) + ",toolbar=no, location=no,directories=yes,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=yes";
        var now = new Date();
        var hour = now.getHours();
        var minute = now.getMinutes();
        var second = now.getSeconds();
        var monthnumber = now.getMonth();
        var monthday = now.getDate();
        var year = now.getYear();
        window.open(url, "" + year + "" + monthnumber + "" + monthday + "" + hour + "" + minute + "" + second, WinSettings);
    }
  
    function ShowPrintOption_<%= this.ctlID %>(pvara) {
        var url = "./Print_Report.aspx?PrintFrom=stock&SessionTime=" + sessionTime;
        var WinSettings = "center:yes;resizable:no;dialogHeight:400px;dialogWidth=700px";
        var returnValue = window.showModalDialog(url, "Report", WinSettings);
    }
  
  
  
      
    function ReloadPanel(SplitterName, PaneName) {
        var splitterPageWnd = window.parent;
        if (splitterPageWnd) {
            splitterPageWnd.refreshPane(SplitterName, PaneName);
        }
    }
  
  
    function ToolTipManager_OnClientResponseError_<%= this.ctlID %>(sender, args) {
        args.set_cancelErrorAlert(true);
    }
  
//    function RequestStart(sender, eventArgs) {
//        var loadingImage = document.getElementById('<%= RadAjaxLoadingPanel1.ClientID %>');
//        var panel1 = $get("<%= grdInstruction.ClientID %>");
//        if (loadingImage != null) {
//            loadingImage.style.position = "relative";
//            loadingImage.style.top = (parseInt(panel1.style.height) / 2) + "px";
//        }
//    }
  
  
    function ManageAddUnit_<%= this.ctlID %>(action) {
        var url = "./CommonPages/Get_Fav_Unit.aspx?Action=" + action;
        var WinSettings = "center:yes;resizable:no;dialogHeight:535px;dialogWidth=700px";
        var returnValue = window.showModalDialog(url, null, WinSettings);
        if (returnValue) {
            if (action == "Add") {
                alert('Selected item is added.');
            } else {
                alert('Selected item is removed.');
            }
        }
    }
  
    function ShowPopUpURL_<%= this.ctlID %>(url, WinSettings, eventArgs) {
        if (url != "") {
  
            var fadeBackground = window.parent.document.getElementById('fade');
            if (fadeBackground) {
                fadeBackground.style.display = "block";
            }
            var returnValue = window.showModalDialog(url, null, WinSettings);
  
            if (returnValue != null) {
  
            }
            else {
                if (eventArgs != null) {
                    eventArgs.set_cancel(true);
                }
            }
  
            if (fadeBackground) {
                fadeBackground.style.display = "none";
            }
            return returnValue;
        }
  
    }
  
  
    function ShowClientRecord_<%= this.ctlID %>(recordId, assoClientId) {
        var url = "../EditForm/View_Client.aspx?RecordId=" + recordId + "&SessionTime=" + sessionTime + "&PopUp=1";
        var WinSettings = "left=75,top=50,width=" + (screen.availWidth - 80) + ",height=" + (screen.availHeight - 100) + ",toolbar=no, location=no,directories=yes,status=no,menubar=no,scrollbars=no,copyhistory=yes, resizable=yes";
        var now = new Date();
        var hour = now.getHours();
        var minute = now.getMinutes();
        var second = now.getSeconds();
        var monthnumber = now.getMonth();
        var monthday = now.getDate();
        var year = now.getYear();
        if (assoClientId != null) {
            url += "&DefaultSelAssoClientId=" + assoClientId;
        }
        window.open(url, "" + year + "" + monthnumber + "" + monthday + "" + hour + "" + minute + "" + second, WinSettings);
    }
  
  
  
    </script>
<script language="javascript" type="text/javascript">
    /* grdinstruction ClientEvents */
    function grdinstruction_RowCreated_<%= this.ctlID %>(sender, args) {
        var unitId = args.getDataKeyValue("Unit_Id");
        var instructionId = args.getDataKeyValue("Instruction_Id");
        if (selected[unitId]) {
            args.get_gridDataItem().set_selected(true);
        }
    }
  
    function grdinstruction_OnRowDblClick_<%= this.ctlID %>(sender, eventArgs) {
        var grid = sender;
        var MasterTable = grid.get_masterTableView();
        var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
        var unitId = row.getDataKeyValue("Unit_Id");
        ShowPopupRecord_<%= this.ctlID %>(unitId);
          
    }
  
    function grdinstruction_OnRowClick_<%= this.ctlID %>(sender, args) {
  
        selectedRecord_<%= this.ctlID %>(args);
        ShowRecord(args.getDataKeyValue("Unit_Id"));
    }
    function grdinstruction_RowSelected_<%= this.ctlID %>(sender, args) {
        selectedRecord_<%= this.ctlID %>(args);
  
    }
  
  
  
    function MyRowDeselecting_<%= this.ctlID %>(sender, args) {
        if (args._domEvent.target != undefined) {
            if (args._domEvent.target.cellIndex == 0) {
                args.set_cancel(true);
            }
        }
    }
  
    function MyRowSelecting_<%= this.ctlID %>(sender, args) {
    }
    function MyRowClick_<%= this.ctlID %>(sender, args) {
        var masterTable = $find("<%= grdInstruction.ClientID %>").get_masterTableView();
        var unitId = args.getDataKeyValue("Unit_Id");
    }
  
  
//    function deselectUnit(unitId) {
  
//        if (selected[unitId]) {
//            selected[unitId] = null;
//            selectedCnt--;
//        }
//    }
  
    function grdInstruction_onKeyPressed_<%= this.ctlID %>(sender, eventArgs) {
        if (eventArgs.get_keyCode() == 13) {
            eventArgs.set_cancel(true);
        }
    }
  
    function grdinstruction_RowDeselected_<%= this.ctlID %>(sender, args) {
        var grid = $find("<%=grdInstruction.ClientID %>");
        var unitId = args.getDataKeyValue("Unit_Id");
        var instructionId = args.getDataKeyValue("Instruction_Id");
        var buildingId = args.getDataKeyValue("Building_Id");
        var propertyId = args.getDataKeyValue("Property_Id");
        var isTenantExist = false;
        var isMoreThanOneBuilding = true;
        var isMoreThanOneProperty = true;
        var selectedBuildingCnt = 0;
        var selectedPropertyCnt = 0;
        var selectedUnitId = "";
  
  
  
  
        for (i in selected) {
            if (selected[i]) {
                selectedUnitId += i + "!";
            }
        }
  
        if (!isNaN(selectedBuilding[buildingId])) {
            if (selectedBuilding[buildingId] != 1) {
                selectedBuilding[buildingId] = selectedBuilding[buildingId] + 1;
            } else {
                selectedBuilding[buildingId] = null;
            }
        } else {
            selectedBuilding[buildingId] = null;
        }
  
        for (i in selectedBuilding) {
            if (!isNaN(selectedBuilding[i])) {
                if (selectedBuilding[i] >= 1)
                    selectedBuildingCnt++;
  
            }
        }
  
        if (selectedBuildingCnt == 1) {
            isMoreThanOneBuilding = false;
        }
  
        if (selected[unitId]) {
            selected[unitId] = null;
            selectedCnt--;
            if (instructionId != "") {
                selectedInstructionCnt--;
            }
            if (selectedInstructionCnt == 1 && selectedCnt == 1) {
                if (getGridSelectedRowValue_<%= this.ctlID %>(grid, args, "Tenant_Id") != "") {
                    isTenantExist = true;
                }
                disableStockEdit_<%= this.ctlID %>(true, true, isTenantExist, isMoreThanOneBuilding, selectedCnt);
                enableToolBarButton_<%= this.ctlID %>(false, true);
            } else if (selectedCnt == 0) {
                disableStockEdit_<%= this.ctlID %>(false, false, false, isMoreThanOneBuilding, selectedCnt);
                enableToolBarButton_<%= this.ctlID %>(false, false);
            } else if (selectedCnt > 1) {
                disableStockEdit_<%= this.ctlID %>(false, false, false, isMoreThanOneBuilding, selectedCnt);
                enableToolBarButton_<%= this.ctlID %>(false, true);
            } else {
                if (getGridSelectedRowValue_<%= this.ctlID %>(grid, args, "Tenant_Id") != "") {
                    isTenantExist = true;
                }
                disableStockEdit_<%= this.ctlID %>(false, true, isTenantExist, isMoreThanOneBuilding, selectedCnt);
                enableToolBarButton_<%= this.ctlID %>(false, false);
            }
  
  
        }
  
        if (!isNaN(selectedProperty[propertyId])) {
            if (selectedProperty[propertyId] != 1) {
                selectedProperty[propertyId] = selectedProperty[propertyId] + 1;
            } else {
                selectedProperty[propertyId] = null;
            }
        } else {
            selectedProperty[propertyId] = null;
        }
  
        for (i in selectedProperty) {
            if (!isNaN(selectedProperty[i])) {
                if (selectedProperty[i] >= 1)
                    selectedPropertyCnt++;
            }
        }
  
        if (selectedPropertyCnt == 1) {
            isMoreThanOneProperty = false;
        }
  
        setCookie_<%= this.ctlID %>('RecordIdList', selectedUnitId, 365);
    }
  
  
    /*  grdInstruction called function */
  
  
    function enableToolBarButton_<%= this.ctlID %>(isEnable, isReportEable) {
        var toolBar = $find("<%=rtbStockMenu.ClientID %>");
  
        var btn = toolBar.findItemByValue("Report");
        if (btn) {
            if (isReportEable) {
                btn.enable();
            } else {
                btn.disable();
            }
        }
  
        var btn = toolBar.findItemByValue("Email");
        if (btn) {
            if (isReportEable) {
                btn.enable();
            } else {
                btn.disable();
            }
        }
  
        btn = toolBar.findItemByValue("Fav_Add");
        if (btn) {
            if (isReportEable) {
                btn.enable();
            } else {
                btn.disable();
            }
        }
  
        btn = toolBar.findItemByValue("Fav_Remove");
        if (btn) {
            if (isReportEable) {
                btn.enable();
            } else {
                btn.disable();
            }
        }
    }
  
    function getGridSelectedRowValue_<%= this.ctlID %>(grid, eventArgs, fieldName) {
        var MasterTable = grid.get_masterTableView();
        for (var i = 0; i < MasterTable.get_selectedItems().length; i++) {
            var row = MasterTable.get_selectedItems()[i];
            var cell = MasterTable.getCellByColumnUniqueName(row, fieldName);
            var returnVal = cell.innerHTML;
            if (returnVal == " ") {
                returnVal = "";
            }
            return returnVal;
        }
  
  
    }
  
    function selectedRecord_<%= this.ctlID %>(args) {
        var grid = $find("<%=grdInstruction.ClientID %>");
        var fldSelectedIdList = document.getElementById("<%=fldSelectedIdList.ClientID %>");
        var selectedUnitId = "";
        var isTenantExist = false;
        var isMoreThanOneBuilding = true;
        var isMoreThanOneProperty = true;
        var selectedBuildingCnt = 0;
        var selectedPropertyCnt = 0;
  
        for (i in selected) {
            if (selected[i]) {
                selectedUnitId += i + "!";
            }
        }
        var unitId = args.getDataKeyValue("Unit_Id");
        var instructionId = args.getDataKeyValue("Instruction_Id");
        var buildingId = args.getDataKeyValue("Building_Id");
        var propertyId = args.getDataKeyValue("Property_Id");
  
        if (!isNaN(selectedProperty[propertyId])) {
            selectedProperty[propertyId] = selectedProperty[propertyId] + 1;
        } else {
            selectedProperty[propertyId] = 1;
        }
  
        for (i in selectedProperty) {
            if (!isNaN(selectedProperty[i])) {
                if (selectedProperty[i] >= 1)
                    selectedPropertyCnt++;
            }
        }
  
        if (selectedPropertyCnt == 1) {
            isMoreThanOneProperty = false;
        }
  
        if (!isNaN(selectedBuilding[buildingId])) {
            selectedBuilding[buildingId] = selectedBuilding[buildingId] + 1;
        } else {
            selectedBuilding[buildingId] = 1;
        }
  
        for (i in selectedBuilding) {
            if (!isNaN(selectedBuilding[i])) {
                if (selectedBuilding[i] >= 1)
                    selectedBuildingCnt++;
            }
        }
  
        if (selectedBuildingCnt == 1) {
            isMoreThanOneBuilding = false;
        }
        if (!selected[unitId]) {
            selected[unitId] = true;
            selectedCnt++;
            if (instructionId != "") {
                selectedInstructionCnt++;
            }
            if (selectedInstructionCnt == 1 && selectedCnt == 1) {
                if (getGridSelectedRowValue_<%= this.ctlID %>(grid, args, "Tenant_Id") != "") {
                    isTenantExist = true;
                }
                disableStockEdit_<%= this.ctlID %>(true, true, isTenantExist, isMoreThanOneBuilding, selectedCnt);
            } else if (selectedCnt == 0) {
                disableStockEdit_<%= this.ctlID %>(false, false, false, isMoreThanOneBuilding, selectedCnt);
            } else if (selectedCnt > 1) {
                disableStockEdit_<%= this.ctlID %>(false, false, false, isMoreThanOneBuilding, selectedCnt);
            } else {
                if (getGridSelectedRowValue_<%= this.ctlID %>(grid, args, "Tenant_Id") != "") {
                    isTenantExist = true;
                }
                disableStockEdit_<%= this.ctlID %>(false, true, isTenantExist, isMoreThanOneBuilding, selectedCnt);
            }
            enableToolBarButton_<%= this.ctlID %>(true, true);
  
        }
        setCookie_<%= this.ctlID %>('RecordIdList', selectedUnitId, 365);
    }
  
  
    function disableStockEdit_<%= this.ctlID %>(isEnable, isEnableMemo, isTenureExist, isMoreThanOneBuilding, selectCnt) {
  
        var toolBar = $find("<%=rtbStockMenu.ClientID %>");
  
        var itemEditPrice = toolBar.findItemByValue("EditPrice");
        var itemEditInactivate = toolBar.findItemByValue("EditInActivate");
        var itemEditOwner = toolBar.findItemByValue("EditOwner");
        var itemEditStock = toolBar.findItemByValue("EditStock");
        var itemEditMemo = toolBar.findItemByValue("EditMemo");
        var itemEditEAA = toolBar.findItemByValue("EditEAA");
        var itemEditInternalRemarks = toolBar.findItemByValue("EditInternalRemarks");
        var itemEditViewingContact = toolBar.findItemByValue("EditViewingContact");
  
        var itemCreateOwnerTenure = toolBar.findItemByValue("CreateOwnerTenure");
  
        var itemUpdateLeaseTenure = toolBar.findItemByValue("UpdateLeaseTenure");
        //var itemRenewLeaseTenure = toolBar.findItemByValue("RenewLeaseTenure");
        var itemCreateLeaseTenure = toolBar.findItemByValue("CreateLeaseTenure");
        var itemTerminateLeaseTenure = toolBar.findItemByValue("TerminateLeaseTenure");
        var itemRelocationLeaseTenure = toolBar.findItemByValue("RelocationLeaseTenure");
  
        var itemTranasctionOwned = toolBar.findItemByValue("TransactionSaleSearch");
        var itemTranasctionLeased = toolBar.findItemByValue("TransactionLeaseSearch");
  
        toolBar.trackChanges();
  
        if (!isEnableMemo) {
            if (itemEditMemo != null) {
                itemEditMemo.disable();
            }
            if (itemEditStock != null) {
                itemEditStock.disable();
            }
            if (itemEditOwner != null) {
                itemEditOwner.disable();
            }
  
        } else {
            if (itemEditMemo != null) {
                itemEditMemo.enable();
            }
            if (itemEditStock != null) {
                itemEditStock.enable();
            }
            if (itemEditOwner != null) {
                itemEditOwner.enable();
            }
  
        }
        if (!isEnable) {
            if (itemEditPrice != null) {
                itemEditPrice.disable();
            }
            if (itemEditInactivate != null) {
                itemEditInactivate.disable();
            }
  
  
            if (itemEditEAA != null) {
                itemEditEAA.disable();
            }
            if (itemEditInternalRemarks != null) {
                itemEditInternalRemarks.disable();
            }
            if (itemEditViewingContact != null) {
                itemEditViewingContact.disable();
            }
        } else {
            if (itemEditPrice != null) {
                itemEditPrice.enable();
            }
            if (itemEditInactivate != null) {
                itemEditInactivate.enable();
            }
  
  
            if (itemEditEAA != null) {
                itemEditEAA.enable();
            }
            if (itemEditInternalRemarks != null) {
                itemEditInternalRemarks.enable();
            }
            if (itemEditViewingContact != null) {
                itemEditViewingContact.enable();
            }
        }
  
  
        if (itemUpdateLeaseTenure != null) {
            itemUpdateLeaseTenure.disable();
        }
        if (itemTerminateLeaseTenure != null) {
            itemTerminateLeaseTenure.disable();
        }
  
        if (itemRelocationLeaseTenure != null) {
            itemRelocationLeaseTenure.disable();
        }
        if (isTenureExist) {
            if (selectCnt == 1) {
                if (itemUpdateLeaseTenure != null) {
                    itemUpdateLeaseTenure.enable();
                }
  
                if (itemRelocationLeaseTenure != null) {
                    itemRelocationLeaseTenure.enable();
                }
            }
        }
  
        if (selectCnt >= 1) {
            if (itemTerminateLeaseTenure != null) {
                itemTerminateLeaseTenure.enable();
            }
        }
  
        if (isMoreThanOneBuilding) {
            if (itemCreateOwnerTenure != null) {
                itemCreateOwnerTenure.disable();
            }
            if (itemCreateLeaseTenure != null) {
                itemCreateLeaseTenure.disable();
            }
            if (itemTranasctionOwned != null) {
                itemTranasctionOwned.disable();
            }
            if (itemTranasctionLeased != null) {
                itemTranasctionLeased.disable();
            }
        } else {
            if (itemCreateOwnerTenure != null) {
                itemCreateOwnerTenure.enable();
            }
            if (itemCreateLeaseTenure != null) {
                itemCreateLeaseTenure.enable();
            }
            if (itemTranasctionOwned != null) {
                itemTranasctionOwned.enable();
            }
            if (itemTranasctionLeased != null) {
                itemTranasctionLeased.enable();
            }
        }
  
        toolBar.commitChanges();
  
    }
    function ShowLeaseHistory_<%= this.ctlID %>(unitId) {
        var url = "./EditForm/View_Lease_History.aspx?SessionTime=" + sessionTime + "&UnitId=" + unitId + "&TenureType=leaseholder&LeaseStatus=FUTURE";
        var WinSettings = "center:yes;resizable:no;dialogHeight:600px;dialogWidth=800px";
        var returnValue = window.showModalDialog(url, "OwnerHistory", WinSettings);
        return false;
    }
</script>
</telerik:RadCodeBlock>
      
        <asp:Label ID="lbMsg" runat="server" Visible="false"></asp:Label>
        <asp:Label ID="lbMsg2" runat="server" Visible="false"></asp:Label
        <telerik:RadSplitter ID="RadSplitter_Outermost" runat="server" 
            Width="100%" Height="100%" BorderWidth="0" VisibleDurinInit="false"
            LiveResize="false" Orientation="Horizontal"  
            ResizeWithBrowserWindow="true" ResizeWithParentPane="true" 
            ResizeMode="EndPane">
        <telerik:RadPane ID="RadPane_Top" runat="server" 
            Width="100%" MinHeight="30" Height="53" MaxHeight="53"
            Scrolling="None" BorderWidth="0">
                <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td colspan="2" align="left" valign="top">
                        <telerik:RadToolBar ID="rtbStockMenu" runat="server" CssClass="MenuCssClass"
                            Skin="Telerik" Width="100%" ExpandAnimation-Duration="0" CollapseAnimation-Duration="0" 
                            EnableShadows="True" 
                            Height="25px" BorderWidth="0px" 
                            OnButtonClick="rtbStockMenu_ButtonClick">
                            <Items>
                                <telerik:RadToolBarButton Text="Memo" Value="EditMemo" ToolTip="Edit Memo" PostBack="true" CausesValidation="false" CheckOnClick="false" ImagePosition="Left" ImageUrl="~/Images/notes-edit-icon_16x16.png" Visible="false" />                    
                                <telerik:RadToolBarButton Text="Price" Value="EditPrice" ToolTip="Edit Price" PostBack="true" CausesValidation="false" CheckOnClick="false" ImagePosition="Left" ImageUrl="~/Images/Green-Dollar-icon_16x16.png" Visible="false" />                    
                                <telerik:RadToolBarButton Text="Edit" Value="EditStock" ToolTip="Edit Stock" PostBack="true" CausesValidation="false" CheckOnClick="false" ImagePosition="Left" ImageUrl="~/Images/Edit_16x16.png" Visible="false" />                    
                                <telerik:RadToolBarButton Text="OwnerBak" Value="EditOwner" ToolTip="Edit Owner" PostBack="true" CausesValidation="false" CheckOnClick="false" ImagePosition="Left" ImageUrl="~/Images/User-icon_16x16.png" Visible="false" />                                                    
                                <telerik:RadToolBarButton Text="Inactive" Value="EditInActivate" ToolTip="Edit Inactive" PostBack="true" CausesValidation="false" CheckOnClick="false" ImagePosition="Left" ImageUrl="~/Images/Close-2-icon_16x16.png" Visible="false" />                    
                                <telerik:RadToolBarButton Text="EAA" Value="EditEAA" PostBack="true" ToolTip="Edit EAA" CausesValidation="false" CheckOnClick="false" ImagePosition="Left" ImageUrl="~/Images/notes-edit-icon_16x16.png" Visible="false" />                    
                                <telerik:RadToolBarDropDown Text="Owner" ToolTip="Owner"  DropDownWidth="200px">
                                    <Buttons >
                                        <telerik:RadToolBarButton runat="server" CausesValidation="False" 
                                            Text="Create Owner History" Value="CreateOwnerTenure" Visible="false">
                                        </telerik:RadToolBarButton>
                                    </Buttons>                                    
                                </telerik:RadToolBarDropDown>
                                <telerik:RadToolBarDropDown Text="Lease"  ToolTip="Lease"  DropDownWidth="200px">
                                    <Buttons >
                                        <telerik:RadToolBarButton runat="server" CausesValidation="False" 
                                            Text="Create Lease Tenure" Value="CreateLeaseTenure" Visible="false">
                                        </telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton runat="server" Text="Update Lease Tenure" 
                                            Value="UpdateLeaseTenure"  Visible="false">
                                        </telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton runat="server" Text="Terminate Lease Tenure" 
                                            Value="TerminateLeaseTenure"  Visible="false">
                                        </telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton runat="server" CausesValidation="False" 
                                            Text="Tenure Relocation" Value="RelocationLeaseTenure" Visible="false">
                                        </telerik:RadToolBarButton>
                                    </Buttons>
                                </telerik:RadToolBarDropDown>
                                <telerik:RadToolBarDropDown Text="Transaction" ToolTip="Transaction"  DropDownWidth="200px">
                                    <Buttons >
                                        <telerik:RadToolBarButton runat="server" CausesValidation="False" 
                                            Text="Sale" Value="TransactionSaleSearch" Visible="false">
                                        </telerik:RadToolBarButton>
                                        <telerik:RadToolBarButton runat="server" CausesValidation="False" 
                                            Text="Leasing" Value="TransactionLeaseSearch" Visible="false">
                                        </telerik:RadToolBarButton>
                                    </Buttons>                                    
                                </telerik:RadToolBarDropDown>
                                <telerik:RadToolBarDropDown Text="View"  Visible="False"  DropDownWidth="200px"
                                    runat="server" ></telerik:RadToolBarDropDown>                    
                                <telerik:RadToolBarButton Text="Internal Remarks" Value="EditInternalRemarks" 
                                    ToolTip="Edit InternalRemarks" PostBack="true" CausesValidation="false" 
                                    CheckOnClick="false" ImagePosition="Left" 
                                    ImageUrl="~/Images/notes-edit-icon_16x16.png" Visible="false" />                                                    
                                <telerik:RadToolBarButton CausesValidation="false" CheckOnClick="false" 
                                    ImagePosition="Left" ImageUrl="~/Images/notes-edit-icon_16x16.png" 
                                    PostBack="true" Text="Viewing Contact" ToolTip="Edit Viewing Contact" 
                                    Value="EditViewingContact" Visible="false"></telerik:RadToolBarButton>
                                <telerik:RadToolBarButton IsSeparator="true" />                                                                                
                                <telerik:RadToolBarButton CausesValidation="false" CheckOnClick="false" 
                                    Enabled="false" ImagePosition="Left" ImageUrl="~/Images/printer_16x16.png" 
                                    PostBack="true" Text="" ToolTip="Generate Report" Value="Report"></telerik:RadToolBarButton>                                
                                <telerik:RadToolBarButton CausesValidation="false" CheckOnClick="false"  Visible="false"
                                    Enabled="true" ImagePosition="Left" ImageUrl="~/Images/printer_16x16.png" 
                                    PostBack="true" Text="All" ToolTip="Generate Report All" Value="PrintReportAll"></telerik:RadToolBarButton>                                
                                <telerik:RadToolBarButton IsSeparator="true" />
                                <telerik:RadToolBarButton CausesValidation="false" CheckOnClick="false" 
                                    Enabled="false" ImagePosition="Left" ImageUrl="~/Images/email02.png" 
                                    PostBack="false" Text="" ToolTip="Email Stock Web Link" Value="Email" 
                                    Visible="false"></telerik:RadToolBarButton>                                
                                <telerik:RadToolBarButton IsSeparator="true" />                                                                                
                                <telerik:RadToolBarButton Text="" Value="Fav_Add" ToolTip="Add to Favorite or My Prospect" 
                                    PostBack="true" CausesValidation="false" CheckOnClick="false" 
                                    ImagePosition="Left" ImageUrl="~/Images/Add-icon_16x16.png" 
                                    Enabled="false" />                                                                                                            
                                <telerik:RadToolBarButton CausesValidation="false" CheckOnClick="false" 
                                    Enabled="true" ImagePosition="Left" 
                                    ImageUrl="~/Images/Remove-icon_16x16.png" PostBack="true" Text="" 
                                    ToolTip="Remove from Favorite or My Prospect" Value="Fav_Remove"></telerik:RadToolBarButton>                                
                                <telerik:RadToolBarButton IsSeparator="true" />                         
                                <telerik:RadToolBarButton CausesValidation="false" CheckOnClick="false" 
                                    ImagePosition="Left" ImageUrl="~/Images/Save-icon_16x16.png" 
                                    PostBack="true" Text="" ToolTip="Save Column Order" Value="SaveColumnOrder"></telerik:RadToolBarButton>                                
                                <telerik:RadToolBarButton IsSeparator="true">
                                </telerik:RadToolBarButton>                                                    
                                <telerik:RadToolBarButton Value="Filter">
                                    <ItemTemplate>
                                        <telerik:RadMenu ID="mnuInstructionAction" Runat="server" BorderWidth="0"  
                                            ClickToOpen="true" CollapseAnimation-Duration="0" CollapseAnimation-Type="None" 
                                            CssClass="MenuCssClass" EnableImagePreloading="true" 
                                            EnableRoundedCorners="true" EnableShadows="true" ExpandAnimation-Duration="0" 
                                            ExpandAnimation-Type="None" ExpandDelay="0" 
                                            OnItemClick="mnuInstructionAction_ItemClick" Skin="Telerik" 
                                            style="top: 0px; width: 130px; text-align: left;">
                                            <Items>
                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                    ImageUrl="~/Images/filter-icon_16x16.png" 
                                                    meta:resourcekey="RadMenuItemResource2" PostBack="false" Text="Filter..." 
                                                    ToolTip="Filter..." Value="View">
                                                    <Items>
                                                        <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                            meta:resourcekey="RadMenuItemResource1" PostBack="false" Text="Agency Type..." 
                                                            Value="Agency_Type">
                                                        </telerik:RadMenuItem>
                                                    </Items>
                                                    <Items>
                                                        <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                            meta:resourcekey="RadMenuItemMarketType" PostBack="false" Text="Market Type..." 
                                                            Value="Market_Type">
                                                        </telerik:RadMenuItem>
                                                    </Items>
                                                    <Items>
                                                        <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                            meta:resourcekey="RadMenuItemKeyStock" PostBack="false" 
                                                            Text="Stock with Key..." Value="Key_Stock">
                                                        </telerik:RadMenuItem>
                                                    </Items>
                                                </telerik:RadMenuItem>
                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" Enabled="false" 
                                                    ExpandMode="ClientSide" GroupSettings-ExpandDirection="Down" 
                                                    meta:resourcekey="RadMenuItemResource15" PostBack="False" Text="Action..." 
                                                    Visible="false">
                                                    <Items>
                                                        <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                            meta:resourcekey="RadMenuItemResource3" PostBack="true" Text="Report" 
                                                            Value="Report">
                                                        </telerik:RadMenuItem>
                                                        <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                            meta:resourcekey="RadMenuItemResource8" PostBack="false" Text="Edit ..." 
                                                            Value="Edit">
                                                            <GroupSettings ExpandDirection="Left" />
                                                            <Items>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource4" PostBack="true" Text="Memo" 
                                                                    Value="EditMemo">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource5" PostBack="true" Text="Price" 
                                                                    Value="EditPrice">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource16" PostBack="true" Text="Stock" 
                                                                    Value="EditStock">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource17" PostBack="true" Text="Owner" 
                                                                    Value="EditOwner">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource7" PostBack="true" Text="Inactivate" 
                                                                    Value="EditInActivate">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource18" PostBack="true" Text="EAA" 
                                                                    Value="EditEAA">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource20" PostBack="true" 
                                                                    Text="Internal Remarks" Value="EditInternalRemarks">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource21" PostBack="true" Text="Viewing Contact" 
                                                                    Value="EditViewingContact">
                                                                </telerik:RadMenuItem>
                                                            </Items>
                                                        </telerik:RadMenuItem>
                                                        <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                            meta:resourcekey="RadMenuItemResource11" PostBack="false" Text="Favorites..." 
                                                            Value="Favourites">
                                                            <Items>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource9" PostBack="true" Text="Add" 
                                                                    Value="Fav_Add">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource10" PostBack="true" Text="Remove" 
                                                                    Value="Fav_Remove">
                                                                </telerik:RadMenuItem>
                                                            </Items>
                                                        </telerik:RadMenuItem>
                                                        <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                            meta:resourcekey="RadMenuItemResource14" PostBack="false" Text="Me..." 
                                                            Value="Me">
                                                            <Items>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource12" PostBack="false" Text="User Profile" 
                                                                    Value="UserProfile" Visible="false">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource13" PostBack="true" 
                                                                    Text="Save Columns Order" Value="SaveColumnOrder">
                                                                </telerik:RadMenuItem>
                                                                <telerik:RadMenuItem runat="server" CssClass="MenuCssClass" 
                                                                    meta:resourcekey="RadMenuItemResource_UploadPic" PostBack="false" 
                                                                    Text="Upload Profile Picture" Value="UploadProfilePicture" Visible="false">
                                                                </telerik:RadMenuItem>
                                                            </Items>
                                                        </telerik:RadMenuItem>
                                                    </Items>
                                                    <GroupSettings ExpandDirection="Down" />
                                                </telerik:RadMenuItem>
                                            </Items>
                                            <ExpandAnimation Duration="0" Type="None" />
                                            <CollapseAnimation Duration="0" Type="None" />
                                        </telerik:RadMenu>
                                    </ItemTemplate>
                                </telerik:RadToolBarButton>
                            </Items>
                            <ExpandAnimation Duration="0" />
                            <CollapseAnimation Duration="0" />
                        </telerik:RadToolBar>
                    </td>
                </tr>
                <tr runat="server" id="LocationBar">
                    <td width="100%" align="left" valign="top" style="height:23px" nowrap >
                        <asp:Panel runat="server" ID="pnlLocationBar">
                        <telerik:RadComboBox ID="cboPropertyLocator" runat="server" AutoPostBack="True"
                            EmptyMessage="Select Property" Visible="False"
                            OnSelectedIndexChanged="cboPropertyLocator_SelectedIndexChanged"
                            meta:resourcekey="cboPropertyLocatorResource1" AppendDataBoundItems="True" 
                            DropDownWidth="400px">
                            <Items>
                                <telerik:RadComboBoxItem runat="server" Text="Select Property" Value="-1" />
                                <telerik:RadComboBoxItem runat="server" Text="-----All-----" Value="ALL" />
                            </Items>
                        </telerik:RadComboBox>
                         <asp:Literal ID="litLocation" runat="server" 
                            meta:resourcekey="litLocationResource1"></asp:Literal>
                        <asp:LinkButton ID="lbtnBound4Locator" runat="server" Text="" 
                            CommandName="BOUND4" CommandArgument="" 
                            OnCommand="lbtnLocator_Command" 
                            Visible="false">
                        </asp:LinkButton>
                           
                        <asp:Literal ID="litBound4Locator" runat="server"  Text=">" Visible="false"></asp:Literal>
                           
                        <asp:LinkButton ID="lbtnBound5Locator" runat="server" Text="" CommandName="BOUND5" CommandArgument="" OnCommand="lbtnLocator_Command" Visible="false"></asp:LinkButton>
                        <telerik:RadComboBox ID="cboBound5Locator" runat="server" AutoPostBack="true" 
                            EmptyMessage="Select Bound5" Visible="false"
                            onselectedindexchanged="cboBound5Locator_SelectedIndexChanged" 
                            DropDownWidth="400px">
                        </telerik:RadComboBox>
                           
                        <asp:Literal ID="litBound5Locator" runat="server"  Text=">" Visible="false"></asp:Literal>
                           
                        <asp:LinkButton ID="lbtnPropertyLocator" runat="server" Text="" CommandName="PROPERTY" CommandArgument="" OnCommand="lbtnLocator_Command" Visible="false"></asp:LinkButton>
                        <telerik:RadComboBox ID="cboPropertyLocator2" runat="server" AutoPostBack="true" 
                            EmptyMessage="Select Property" Visible="false"
                            onselectedindexchanged="cboPropertyLocator2_SelectedIndexChanged" 
                            DropDownWidth="400px">
                        </telerik:RadComboBox>
                           
                        <asp:Literal ID="litPropertyLocator" runat="server"  Text=">" Visible="false"></asp:Literal>
                           
                        <telerik:RadComboBox ID="cboBuildingLocator" runat="server" AutoPostBack="true" 
                            EmptyMessage="Select Building" Visible="false"
                            onselectedindexchanged="cboBuildingLocator_SelectedIndexChanged" 
                            DropDownWidth="400px">
                        </telerik:RadComboBox>
                           
                        <asp:Literal ID="litBuildingLocator" runat="server"  Text=">" Visible="false"></asp:Literal>
                           
                        <telerik:RadComboBox ID="cboUnitLocator" runat="server" AutoPostBack="true"
                            EmptyMessage="Select Unit" 
                            OnSelectedIndexChanged="cboUnitLocator_SelectedIndexChanged"
                            meta:resourcekey="cboUnitLocatorResource1" DropDownWidth="400px">
                        </telerik:RadComboBox
                        </asp:Panel>
                    </td>
                    <td align="right" nowrap>
                        <asp:Label runat="server" ID="lblPerformanceData" Text=""></asp:Label>
                    </td>
                </tr>
                </table>            
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane_Bottom" runat="server" 
            Width="100%" BorderWidth="0" 
            Scrolling="None">
            <telerik:RadGrid ID="grdInstruction" runat="server" 
                CssClass="RadGridCssClass" Height="100%" 
                AllowMultiRowSelection="True" 
                AllowPaging="True" AllowSorting="True" 
                PageSize="100"               
                AutoGenerateColumns="False" GridLines="None" 
                OnNeedDataSource="grdInstruction_NeedDataSource" 
                Skin="Hay" 
                onitemdatabound="grdInstruction_ItemDataBound" 
                OnItemCommand="grdInstruction_ItemCommand"
                oninsertcommand="grdInstruction_InsertCommand" 
                onprerender="grdInstruction_PreRender" 
                  
                >
                <MasterTableView DataKeyNames="Unit_Id" 
                    ClientDataKeyNames="Unit_Id,Instruction_Id,Building_Id, Property_Id" EnableViewState="true" >
                    <HeaderStyle HorizontalAlign="Left" Wrap="false" CssClass="RadGridCssClass" />
                    <ItemStyle Wrap="false" CssClass="Row1" />
                    <AlternatingItemStyle Wrap="false" CssClass="Row1" />
                    <PagerStyle Position="Bottom" AlwaysVisible="true" Mode="NumericPages" />
                    <NoRecordsTemplate>
                        <div>There are no records to display</div>
                    </NoRecordsTemplate>
                    <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" 
                            Reorderable="false" 
                            <HeaderStyle Width="30px" />
                            <ItemStyle Width="30px" />
                        </telerik:GridClientSelectColumn
                        <telerik:GridTemplateColumn
                            AllowFiltering="False" 
                            DataField="Property_Building_Name" 
                            SortExpression="Property_Building_Name" 
                            HeaderText="Building" 
                            HeaderStyle-Width="120px"
                            ItemStyle-Width="120px"
                            ItemStyle-HorizontalAlign="Left" 
                            UniqueName="Property_Building_Name" Reorderable="false" 
                             >
                            <ItemTemplate>
                                <nobr>
                                    <asp:LinkButton ID="btnPropertyBuildingName" runat="server"><%# DataBinder.Eval(Container.DataItem, "Property_Building_Name")%></asp:LinkButton
                                </nobr>                                               
                            </ItemTemplate>   
                            <HeaderStyle Width="120px" />
                            <ItemStyle HorizontalAlign="Left" Width="120px" />
                        </telerik:GridTemplateColumn
                          
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="Property_Name" 
                            SortExpression="Property_Name"
                            DataFormatString="<nobr>{0} </nobr>" HeaderText="Bld" 
                            UniqueName="Property_Name" Reorderable="false" meta:resourcekey="Property_Name">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="Building_Name" 
                            SortExpression="Building_Name"
                            DataFormatString="<nobr>{0} </nobr>" HeaderText="Block" 
                            UniqueName="Building_Name" Reorderable="false" meta:resourcekey="Building_Name">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Unit_Floor" 
                            SortExpression="Unit_Floor"  
                            HeaderText="Flr" UniqueName="Unit_Floor"  
                            DataFormatString="<nobr>{0}</nobr>" AllowFiltering="False"  
                            Reorderable="false" meta:resourcekey="Unit_Floor">
                            <HeaderStyle Width="40px"  />
                            <ItemStyle Width="40px" HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn
                            AllowFiltering="False" 
                            DataField="Unit_Number_From" 
                            SortExpression="Unit_Number_From" 
                            HeaderText="Unit" 
                            HeaderStyle-Width="60px"
                            ItemStyle-Width="60px"
                            ItemStyle-HorizontalAlign="Left" 
                            UniqueName="Unit_Number_From" Reorderable="false" 
                            meta:resourcekey="Unit_Number_From" >
                            <ItemTemplate>
                                <nobr><%# DataBinder.Eval(Container.DataItem, "Unit_Number_From")%><asp:HyperLink runat="server" ID="lnkUnit_Number_From" NavigateUrl="#" Text='<%# DataBinder.Eval(Container.DataItem, "UC_Show_Text")%>'></asp:HyperLink> </nobr>                                               
                            </ItemTemplate>   
                            <HeaderStyle Width="60px" />
                            <ItemStyle HorizontalAlign="Left" Width="60px" />
                        </telerik:GridTemplateColumn>   
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="Street"  
                            SortExpression="Street" 
                            DataFormatString="<nobr>{0};</nobr>"
                            HeaderText="Str" UniqueName="Street" 
                            Reorderable="true" meta:resourcekey="Street">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="Bound5_Name" 
                            SortExpression="Bound5_Name"  
                            DataFormatString="<nobr>{0}</nobr>"
                            HeaderText="Str" UniqueName="Bound5_Name" 
                            Reorderable="true" meta:resourcekey="Bound5_Name">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Street_No_From" 
                            SortExpression="Street_No_From_Numeric" 
                            HeaderText="Str Fr"  
                            DataFormatString="<nobr>{0}</nobr>"
                            UniqueName="Street_No_From" 
                            Reorderable="true" meta:resourcekey="Street_No_From">
                            <HeaderStyle Width="35px" />
                            <ItemStyle Width="35px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Street_No_To" 
                            SortExpression="Street_No_To_Numeric"
                            DataFormatString="<nobr>{0}</nobr>"
                            HeaderText="Str To" UniqueName="Street_No_To"
                            Reorderable="true" meta:resourcekey="Street_No_To">
                            <HeaderStyle Width="35px" />
                            <ItemStyle Width="35px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn AllowFiltering="False" 
                            SortExpression="Default_Area_Size" 
                            HeaderText="Area" Reorderable="true"
                            UniqueName="Default_Area_Size"
                            ItemStyle-Wrap="false" 
                            ItemStyle-HorizontalAlign="Right"
                            ItemStyle-Width="60px"
                            HeaderStyle-HorizontalAlign="Center" 
                            HeaderStyle-Width="60px"
                            DataType="System.Double"
                            meta:resourcekey="Default_Area_Size" >
                            <ItemTemplate>
                                <nobr><%# DataBinder.Eval(Container.DataItem, "Default_Area_Size", "{0:#,###}") %><%# DataBinder.Eval(Container.DataItem, "Area_Type_Display_Name") %> </nobr>                                                    
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="60px" />
                            <ItemStyle HorizontalAlign="Right" Width="60px" Wrap="False" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn AllowFiltering="False" 
                            DataField="Efficiency_Ratio_Sqft" 
                            SortExpression="Efficiency_Ratio_Sqft" 
                            HeaderText="Eff %" Reorderable="true"
                            UniqueName="Efficiency_Ratio_Sqft"
                            ItemStyle-Wrap="false" 
                            ItemStyle-HorizontalAlign="Right"
                            ItemStyle-Width="60px"
                            HeaderStyle-HorizontalAlign="Center" 
                            HeaderStyle-Width="60px"
                            meta:resourcekey="Efficiency_Ratio_Sqft" >
                            <ItemTemplate>
                                <nobr><%# DataBinder.Eval(Container.DataItem, "Efficiency_Ratio_Sqft", "{0:#,###}")%> </nobr>                                                    
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="60px" />
                            <ItemStyle HorizontalAlign="Right" Width="60px" Wrap="False" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn 
                            DataField="Tenant_Name"  
                            SortExpression="Tenant_Name"  
                            HeaderText="Tenant" UniqueName="Tenant_Name" 
                            HeaderStyle-Width="120px"
                            ItemStyle-Width="120px"
                            Reorderable="true" meta:resourcekey="Tenant_Name">
                            <ItemTemplate>
                                <nobr>
                                    <asp:LinkButton runat="server" ID="btnTenantName" Text='<%# DataBinder.Eval(Container.DataItem, "Tenant_Name")%>' ></asp:LinkButton>
                                    <asp:HyperLink runat="server" ID="lnkTenant_Name" NavigateUrl="#" visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "Tenant_Name")%>'></asp:HyperLink
                                </nobr>                                                
                            </ItemTemplate>  
                            <HeaderStyle Width="110px" />
                            <ItemStyle Width="110px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn 
                            DataField="Tenant_Contact_Name"  
                            SortExpression="Tenant_Contact_Name"  
                            HeaderText="Tenant Contact" UniqueName="Tenant_Contact_Name" 
                            HeaderStyle-Width="120px"
                            ItemStyle-Width="120px"
                            HeaderStyle-Wrap="false"
                            Reorderable="true" meta:resourcekey="Tenant_Contact_Name">
                            <ItemTemplate>
                                <nobr>
                                    <asp:LinkButton runat="server" ID="btnTenantContactName" Text='<%# DataBinder.Eval(Container.DataItem, "Tenant_Contact_Name")%>' ></asp:LinkButton>
                                    <asp:HyperLink runat="server" ID="lnkTenant_Contact_Name" NavigateUrl="#" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "Tenant_Contact_Name")%>'></asp:HyperLink>
                                 </nobr>                                                
                            </ItemTemplate>  
                            <HeaderStyle Width="120px"   />
                            <ItemStyle Width="120px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn 
                            DataField="Tenant_Id" 
                            SortExpression="Tenant_Id"
                            HeaderText="Existing Tenant" HeaderStyle-Wrap="false" 
                            Visible="true" UniqueName="Tenant_Id" 
                            Reorderable="true" meta:resourcekey="Tenant_Id">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Tenant_Contact_Id" 
                            SortExpression="Tenant_Contact_Id"
                            HeaderText="Tenant_Contact_Id" HeaderStyle-Wrap="false" 
                            Visible="false" UniqueName="Tenant_Contact_Id" 
                            Reorderable="true" meta:resourcekey="Tenant_Contact_Id">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Rent_Ask" 
                            SortExpression="Rent_Ask" 
                            DataFormatString="{0:#,##0.00}"  
                            HeaderText="Price (L)" UniqueName="Rent_Ask" 
                            Reorderable="true" meta:resourcekey="Rent_Ask">
                            <HeaderStyle Width="100px" HorizontalAlign="Center" />
                            <ItemStyle Width="100px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Asking_Rent_UOM"
                            SortExpression="Asking_Rent_UOM" 
                            DataFormatString="{0:#,##0.00}" HeaderText="PSF (L)" 
                            UniqueName="Asking_Rent_UOM" Reorderable="true" 
                            meta:resourcekey="Asking_Rent_UOM">
                            <HeaderStyle Width="60px" HorizontalAlign="Center" />
                            <ItemStyle Width="60px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Bottom_Rent_UOM"
                            SortExpression="Bottom_Rent_UOM" 
                            DataFormatString="{0:#,##0.00}" HeaderText="Bottom PSF (L)" 
                            HeaderStyle-Wrap="false"
                            UniqueName="Bottom_Rent_UOM" Reorderable="true" 
                            meta:resourcekey="Bottom_Rent_UOM">
                            <HeaderStyle Width="120px" HorizontalAlign="Center" Wrap="false" />
                            <ItemStyle Width="120px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Available_Date" 
                            SortExpression="Available_Date" 
                            HeaderText="Avail" DataType="System.DateTime"
                            UniqueName="Available_Date" 
                            DataFormatString="{0:dd-MM-yyyy}" 
                            Reorderable="true" meta:resourcekey="Available_Date">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Price_Asking_Sell_Amount" 
                            SortExpression="Price_Asking_Sell_Amount"  
                            HeaderText="Price (S)" UniqueName="Price_Asking_Sell_Amount" 
                            DataFormatString="{0:#,##0.00}"
                            Reorderable="true" meta:resourcekey="Price_Asking_Sell_Amount" >
                            <HeaderStyle Width="100px" HorizontalAlign="Center" />
                            <ItemStyle Width="100px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Asking_Sale_UOM"  
                            SortExpression="Asking_Sale_UOM"  
                            DataFormatString="{0:#,##0.00}" HeaderText="PSF (S)" 
                            UniqueName="Asking_Sale_UOM" 
                            Reorderable="true" meta:resourcekey="Asking_Sale_UOM">
                            <HeaderStyle Width="60px" HorizontalAlign="Center" />
                            <ItemStyle Width="60px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="Owner" 
                            DataField="Owner_Name" 
                            SortExpression="Owner_Name"
                            UniqueName="Owner_Name"                          
                            HeaderStyle-Width="120px"
                            ItemStyle-Width="120px" 
                            ItemStyle-Wrap="false" 
                            Reorderable="true" meta:resourcekey="Owner_Name">
                            <ItemTemplate>
                                <nobr>
                                    <asp:LinkButton runat="server" ID="btnOwnerName" Text='<%# DataBinder.Eval(Container.DataItem, "Owner_Name")%>' ></asp:LinkButton>
                                    <asp:HyperLink runat="server" ID="lnkOwner_Name" Visible="false" NavigateUrl="#" Text='<%# DataBinder.Eval(Container.DataItem, "Owner_Name")%>'></asp:HyperLink>
                                  </nobr>                                                
                            </ItemTemplate>                        
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" Wrap="False" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Yield" 
                            DataField="Yield"  
                            SortExpression="Yield"
                            UniqueName="Yield" 
                            DataFormatString="<nobr>{0:#,##0.00}%</nobr>" 
                            Reorderable="true" meta:resourcekey="Yield" >
                            <HeaderStyle Width="40px" />
                            <ItemStyle Width="40px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Existing Rent" 
                            DataField="Cur_Rent" 
                            SortExpression="Cur_Rent" 
                            UniqueName="Cur_Rent" 
                            DataFormatString="<nobr>{0}</nobr>" 
                            Reorderable="true" HeaderStyle-Wrap="false"
                            meta:resourcekey="Cur_Rent" >
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Expiry" 
                            DataField="Expiry"  
                            SortExpression="Expiry"
                            UniqueName="Expiry" 
                            DataFormatString="{0:dd-MM-yyyy}" 
                            Reorderable="true" meta:resourcekey="Expiry">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Owner_Id_Text" 
                            SortExpression="Owner_Id_Text"
                            DataFormatString="<nobr>{0}</nobr>" 
                            HeaderText="Owner_Id_Text" UniqueName="Owner_Id_Text" 
                            Visible="false" meta:resourcekey="Owner_Id_Text">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn
                            DataField="Owner_Contact" 
                            SortExpression="Owner_Contact"
                            HeaderText="Owner Contact" UniqueName="Owner_Contact"
                            HeaderStyle-Width="120px"
                            ItemStyle-Width="120px" 
                            Reorderable="true"
                            meta:resourcekey="Owner_Contact2">  
                            <ItemTemplate>
                                <nobr>
                                    <asp:LinkButton runat="server" ID="btnOwnerContactName" Text='<%# DataBinder.Eval(Container.DataItem, "Owner_Contact")%>' ></asp:LinkButton>
                                    <asp:HyperLink runat="server" ID="lnkOwner_Contact" Visible="false" NavigateUrl="#" Text='<%# DataBinder.Eval(Container.DataItem, "Owner_Contact")%>'></asp:HyperLink>
                                </nobr>                                               
                            </ItemTemplate>                                          
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridTemplateColumn>           
                        <telerik:GridBoundColumn 
                            DataField="Owner_Contact_Id_Text"
                            SortExpression="Owner_Contact_Id_Text"
                            DataFormatString="<nobr>{0}</nobr>"  
                            Reorderable="true" HeaderText="Owner_Contact_Id_Text" 
                            UniqueName="Owner_Contact_Id_Text" Visible="false" 
                            meta:resourcekey="Owner_Contact_Id_Text">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Occupant_Id"  
                            SortExpression="Occupant_Id"
                            DataFormatString="<nobr>{0}</nobr>"
                            Reorderable="true" HeaderText="Occupant_Id" 
                            UniqueName="Occupant_Id" Visible="false" 
                            meta:resourcekey="Occupant_Id">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn
                            DataField="Occupant_Name" 
                            SortExpression="Occupant_Name"
                            Reorderable="true" HeaderText="Occupant(Brand)"  
                            UniqueName="Occupant_Name" Visible="true"
                            HeaderStyle-Width="120px"
                            ItemStyle-Width="120px"
                            meta:resourcekey="Occupant_Name2">
                            <ItemTemplate>
                                <nobr>
                                    <asp:LinkButton runat="server" ID="btnOccupantName" Text='<%# DataBinder.Eval(Container.DataItem, "Occupant_Name")%>' ></asp:LinkButton>
                                    <asp:HyperLink runat="server" ID="lnkOccupant_Name" Visible="false" NavigateUrl="#" Text='<%# DataBinder.Eval(Container.DataItem, "Occupant_Name")%>'></asp:HyperLink>
                                </nobr>                                                
                            </ItemTemplate>   
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn 
                            DataField="Unit_Date"  
                            SortExpression="Unit_Date"
                            Reorderable="true"  HeaderText="Edit Date" 
                            DataFormatString="{0:dd-MM-yyyy}"
                            UniqueName="Unit_Date" meta:resourcekey="Unit_Date">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Bound4_Name" 
                            SortExpression="Bound4_Name"
                            HeaderText="Loc"  Reorderable="true"
                            UniqueName="Bound4_Name"  
                            DataFormatString="<nobr>{0}</nobr>" 
                            AllowFiltering="False" Visible="false"
                            meta:resourcekey="Bound4_Name">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AllowFiltering="False"  
                            DataField="Street_No_From_Numeric" 
                            SortExpression="Street_No_From_Numeric" 
                            Reorderable="true" HeaderText="Str No. Fr Num" 
                            DataFormatString="<nobr>{0} </nobr>"
                            DataType="System.Int16" 
                            UniqueName="Street_No_From_Numeric" Visible="False"
                            meta:resourcekey="Street_No_From_Numeric">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AllowFiltering="False" Reorderable="true" 
                            DataField="Street_No_To_Numeric"
                            SortExpression="Street_No_To_Numeric"
                            DataType="System.Int16" 
                            DataFormatString="<nobr>{0}</nobr>"
                            HeaderText="Str No. To Num"  
                            UniqueName="Street_No_To_Numeric" Visible="false"
                            meta:resourcekey="Street_No_To_Numeric">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="Lang2_Building_Name"  
                            SortExpression="Lang2_Building_Name"  
                            Reorderable="true" HeaderText="Bld" 
                            DataFormatString="<nobr>{0} </nobr>"
                            UniqueName="Lang2_Building_Name" Visible="false"
                            meta:resourcekey="Lang2_Building_Name">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="Market_Type"  
                            SortExpression="Market_Type"  
                            Reorderable="true" HeaderText="L/S"
                            DataFormatString="<nobr>{0} </nobr>" 
                            UniqueName="Market_Type" Visible="false"
                            meta:resourcekey="Market_Type">
                            <HeaderStyle Width="50px" />
                            <ItemStyle Width="50px" />
                        </telerik:GridBoundColumn
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="Agency_Code"  
                            SortExpression="Agency_Code"
                            Reorderable="true" HeaderText="Agency_Code" 
                            DataFormatString="<nobr>{0}</nobr>"
                            UniqueName="Agency_Code"  Visible="false" 
                            ItemStyle-Wrap="false" meta:resourcekey="Agency_Code">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AllowFiltering="False" 
                            DataField="UnderOffer"  
                            SortExpression="UnderOffer"  
                            Reorderable="true" HeaderText="UnderOffer" 
                            UniqueName="UnderOffer" Visible="false" 
                            ItemStyle-Wrap="false" meta:resourcekey="UnderOffer">
                            <HeaderStyle Width="40px" />
                            <ItemStyle Width="40px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Instruction_Id"  
                            SortExpression="Instruction_Id"  
                            HeaderText="Instruction Id" Reorderable="true"
                            UniqueName="Instruction_Id" meta:resourcekey="Instruction_Id">
                            <HeaderStyle Width="70px" />
                            <ItemStyle Width="70px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Unit_Id"  
                            SortExpression="Unit_Id"  
                            HeaderText="Unit Id" Reorderable="true"
                            UniqueName="Unit_Id" meta:resourcekey="Unit_Id">
                            <HeaderStyle Width="60px" />
                            <ItemStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Building_Id"  
                            SortExpression="Building_Id"  
                            HeaderText="Building Id" Reorderable="true"
                            UniqueName="Building_Id" meta:resourcekey="Building_Id" Display="false" >
                            <HeaderStyle Width="60px" />
                            <ItemStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Future_Lease_Exist"  
                            SortExpression="Future_Lease_Exist"
                            HeaderText="Future_Lease_Exist" Reorderable="true" Visible="false"
                            UniqueName="Future_Lease_Exist" meta:resourcekey="Future_Lease_Exist">
                            <HeaderStyle Width="60px" />
                            <ItemStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="UC_Exist"  
                            SortExpression="UC_Exist"
                            HeaderText="UC_Exist" Reorderable="true" Visible="false"
                            UniqueName="UC_Exist" meta:resourcekey="UC_Exist">
                            <HeaderStyle Width="60px" />
                            <ItemStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Key_Received_Date"  
                            SortExpression="Key_Received_Date"
                            Reorderable="true"  HeaderText="Key Received Date" 
                            DataFormatString="{0:dd-MM-yyyy}" Visible="true"
                            UniqueName="Key_Received_Date" meta:resourcekey="Key_Received_Date">
                            <HeaderStyle Width="150px" />
                            <ItemStyle Width="150px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn
                            SortExpression="Key_Received_Date"                         
                            HeaderText="Key" Reorderable="true" Visible="true"
                            UniqueName="Key" meta:resourcekey="Key">
                            <HeaderStyle Wrap="false" Width="160px" />
                            <ItemStyle Wrap="false" Width="160px" />
                            <ItemTemplate>
                                <nobr><%# DataBinder.Eval(Container.DataItem, "Key_No").ToString().Trim()%> <%# DataBinder.Eval(Container.DataItem, "Key_Remarks").ToString().Trim()%> <%# DataBinder.Eval(Container.DataItem, "Quantity").ToString().Trim()%> <%# DataBinder.Eval(Container.DataItem, "Keyholder").ToString().Trim()%> <%# DataBinder.Eval(Container.DataItem, "KeyReceivedOnDesc").ToString().Trim()%> <%# DataBinder.Eval(Container.DataItem, "Key_Received_Date", "{0:dd-MM-yyyy}")%></nobr>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn 
                            DataField="Remarks" 
                            DataFormatString="<nobr>{0}</nobr>"
                            HeaderText="Remarks" Reorderable="true" Visible="true"
                            UniqueName="Remarks" meta:resourcekey="Remarks">
                            <HeaderStyle Width="60px" />
                            <ItemStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="CarPark"  
                            DataFormatString="<nobr>{0}</nobr>"
                            HeaderText="Carpark" Reorderable="true" Visible="true"
                            UniqueName="CarPark" meta:resourcekey="CarPark">
                            <HeaderStyle Width="60px" />
                            <ItemStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Condition_Type_Name" EmptyDataText=" " 
                            DataFormatString="<nobr>{0}</nobr>"
                            HeaderText="Possession Type" Reorderable="true" Visible="false"
                            UniqueName="Condition_Type_Name" meta:resourcekey="PossessionType">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="Fixture_Type" EmptyDataText=" " 
                            DataFormatString="<nobr>{0}</nobr>"
                            HeaderText="Fixture Type" Reorderable="true" Visible="false"
                            UniqueName="Fixture_Type" meta:resourcekey="FixtureType">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EmptySpace" HeaderText="" AllowSorting="false"  
                            UniqueName="EmptySpace" meta:resourcekey="EmptySpace" >
                            <HeaderStyle Width="600px" />
                            <ItemStyle Width="600px" />
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>           
                <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="true" 
                    Animation-AllowColumnReorderAnimation="false" Animation-AllowColumnRevertAnimation="false" 
                    Animation-ColumnReorderAnimationDuration="0" Animation-ColumnRevertAnimationDuration="0"                      
                    ReorderColumnsOnClient="true" AllowKeyboardNavigation="True" ColumnsReorderMethod="Reorder" 
                      
                    >
                    <ClientEvents   />
                    <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="false" EnableDragToSelectRows="false" />
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="0" />
                    <Resizing AllowColumnResize="True" AllowResizeToFit="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true" />               
                    <Animation ColumnReorderAnimationDuration="0" 
                        ColumnRevertAnimationDuration="0" />
                </ClientSettings>
                <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu_Hay"></HeaderContextMenu>
            </telerik:RadGrid>
        </telerik:RadPane>
    </telerik:RadSplitter>
        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" 
            OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" 
            CssClass="ToolTipCssClass"
            Animation="Resize" AnimationDuration="300"  
            ShowDelay="0" AutoCloseDelay="0"
            HideDelay="1000" Skin="Hay"
            Width="510px" Height="200px"
            ShowCallout="False"
            ContentScrolling="Auto"
            OffsetX="50" 
            OffsetY="80"
            Position="MiddleRight"  
            HideEvent="ManualClose"
            ShowEvent="OnClick"
            ManualClose="True" 
            meta:resourcekey="RadToolTipManager1Resource1" >
        </telerik:RadToolTipManager>
        <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" >
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="pnlLocationBar">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                        <telerik:AjaxUpdatedControl ControlID="pnlLocationBar" />
                        <telerik:AjaxUpdatedControl ControlID="grdInstruction" 
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="mnuInstructionAction" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="grdInstruction">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                        <telerik:AjaxUpdatedControl ControlID="lbMsg2" />
                        <telerik:AjaxUpdatedControl ControlID="grdInstruction" 
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" 
                                    LoadingPanelID="RadAjaxLoadingPanel1" />
                                  
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="cboUnitLocator">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rtbStockMenu">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdInstruction" />
                        <telerik:AjaxUpdatedControl ControlID="pnlLocationBar" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="mnuInstructionAction">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="mnuInstructionAction" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                        <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" InitialDelayTime="0">
              
        </telerik:RadAjaxLoadingPanel>  
      
    <asp:HiddenField ID="fldSelectedIdList" runat="server" />

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 10 Aug 2012, 09:27 AM
Hello Cloud,

Try setting UpdatePanelHeight="100%" inside the AjaxUpdatedControl declaration in your AjaxSettings, e.g.:
<telerik:AjaxSetting AjaxControlID="cboUnitLocator">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelHeight="100%" />
        <telerik:AjaxUpdatedControl ControlID="lbMsg" />
    </UpdatedControls>
</telerik:AjaxSetting>


All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Cloud
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or