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

.data("kendoSplitter") returns undefined.

1 Answer 242 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 14 Nov 2013, 06:57 PM
The splitter shows up, but I want the splitter to fill the page as it's shown, with a min height . However, when I adjust the page nothing happens. I tried to use the 
var resizeSplitter = function() {
    var topHeight = 100;
    var bottomHeight = 100;
    var centerHeight = $(window).height() - (topHeight + bottomHeight);
  
    var splitter = $("#vertical").data("kendoSplitter");
  
    splitter.size("#topPane", topHeight + "px");
    splitter.size("#middlePane", centerHeight + "px");
    splitter.size("#bottomPane", bottomHeight + "px");
     
    splitter.trigger("resize")
};
but it doesn't find the splitter. Any advice would be appreciated.

here is my HTML & JS

<!DOCTYPE html>
<html>
<head>
    <title></title>
 
    <link href="Content/KendoUI/styles/kendo.common.min.css" rel="stylesheet" />
    <link href="Content/KendoUI/styles/kendo.default.min.css" rel="stylesheet" />
 
    <script src="Scripts/KendoUI/jquery-1.8.2.js"></script>
    <script src="Scripts/KendoUI/kendo.all.js"></script>
 
    <script src="Scripts/spotfire/SpotfireApi.4.0.js"></script>
    <script src="Scripts/spotfire/POCWebPlayer.js"></script>
 
</head>
<body>
            <script>
                function getGridStudyFileter(sel) {
                    var value = sel.options[sel.selectedIndex].value;
                    var grid = $("#grid").data("kendoGrid");
                    if (value !== "") {
                        grid.dataSource.filter({ field: "StudyName", operator: "eq", value: value });
                    } else {
                        grid.dataSource.filter({});
                    }
 
                    /*
                    webPlayer.analysisDocument.setDocumentProperty(
                                "SelectedStudies",
                                [value]);
                    */
                }
            </script>
            <div id="filtering" style="border-color: darkblue;border:double">
                <select id="ddStudyName" onchange="getGridStudyFileter(this)">
                    <option value="">None Selected</option>
                    <option value="IPI-142-02">IPI-142-02</option>
                    <option value="IPI-142-02">IPI-142-06</option>
                    <option value="IPI-504-14">IPI-504-14</option>
                    <option value="IPI-504-15">IPI-504-15</option>
                </select>
                :::
                <span id="clientHeightDiv" ></span> :::
                <span id="windowHeightDiv" ></span> :::
                <span id="filteringSizeDiv"></span> :::
                <span id="TheSplitterContainerSizeDiv"></span> :::
                <span id="TheGridSizeDiv"></span> :::
                <span id="TheGridDataAreaDiv"></span> :::
                <br />
                <span id="splitterSizeDiv"></span> :::
                <span id="top-paneSizeDiv"></span> :::
                <span id="reconcileSizeDiv"></span> :::
                <span id="bottom-paneSizeDiv"></span> :::
                <span id="webPlayerSizeDiv"></span> :::
            </div>
 
    <div id="TheSplitterContainer" style="border-color: darkblue;border:double" class="k-content">
            <div id="vertical" style="min-height:500px;" >
                <div id="top-pane">
 
                        <div id="reconcileDiv" style="background-color:silver; font-family:'Courier New';font-size:10px;">
                            <div id="grid"  ></div>
                        </div>
                </div>
                <div id="bottom-pane">
                    <div class="pane-content">
 
                            <div class="pane-content">
                                <div id="webPlayerDiv" style="background-color:silver;overflow:auto;" ></div>
                            </div>
                    </div>
                </div>
            </div>
    </div>
</body>
</html>
JS:
var webPlayer;
var webPlayerRelativePath = "http://ipispotfireweb.infinitypharm1.com/spotfire/"; //"../SpotfireWeb/";
var analysisPath = "/Clinical/Safety/SAE Reconciliation/SAE Reconciliation Version 2"; // "/Test and Development/SAETest";  //";//
 
var CONTROL_WIDTH = 800;
var RECONCILE_HEIGHT = 300;
 
window.onload = function () {
 
    //document.domain = "infinitypharm1.com";
    //openWebPlayer();
 
    CONTROL_WIDTH = 800;
    RECONCILE_HEIGHT =500;
};
 
var createLayout = function () {
    resize();
};
 
var grid;
 
var BindData = function (data) {
 
     
    try {
        var dataSource = $('#grid').data("kendoGrid").dataSource;
        dataSource.data(data);
        //dataSource.read();
        $('#grid').data("kendoGrid").refresh();
        dataSource.sync();
    } catch (e) {
        alert(e);
    }
     
}
 
var textEditorInitialize = function (container, options) {
    $('<textarea name="' + options.field + '" style="width:140px;height:100px" />').appendTo(container);
};
 
var statusEditorInitialize = function (container, options) {
    $('<select name="' + options.field + '" ><option value="Open">Open</option><option value="Closed">Closed</option><option value="Queried">Queried</option><option value="Acceptable Discrepancy">Acceptable Discrepancy</option><option value="Pending PV Comment">Pending PV Comment</option></select>').appendTo(container);
};
 
function resizeGrid(newHeight) {
    var gridElement = $("#grid");
    var dataArea = gridElement.find(".k-grid-content");
    //var newHeight = gridElement.parent().innerHeight() - 2;
    //var diff = gridElement.innerHeight() - dataArea.innerHeight();
    gridElement.height(newHeight);
    //dataArea.height(newHeight - diff);
}
 
var resizeSplitter = function () {
    var topHeight = 100;
    var bottomHeight = 100;
    var centerHeight = $(window).height() - (topHeight + bottomHeight);
 
    var splitter = $("#vertical").data("kendoSplitter");
 
    splitter.size("#topPane", topHeight + "px");
    splitter.size("#middlePane", centerHeight + "px");
    splitter.size("#bottomPane", bottomHeight + "px");
 
    splitter.trigger("resize")
};
 
$(document).ready(function () {
    createLayout();
 
    // var crudServiceBaseUrl = this.location.protocol + "//" + this.location.hostname + "/Argus.WebServices/api";
 
    var testdata = [
        { "Id": 106, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 107, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 108, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 109, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 110, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 111, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 112, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
        { "Id": 113, "StudyName": "IPI-504-15", "UsubjId": "IPI-504-15-003-004", "Psubjid": "003-004", "MatchId": "IPI-504-15-003-004_Back pain_2012Apr24", "MatchSources": "Both", "ArgusCaseNum": "2012-00120", "Field": "GENDER", "ArgusValue": "FEMALE", "CricitValue": "F", "ValuesMatch": "Y", "Status": "Open", "DateCreated": "2013-09-17T04:00:00.000Z", "DmComments": "aaa", "PVComments": "vvv" },
    ]
 
 
 
    $("#vertical").kendoSplitter({
        orientation: "vertical",
        resize: resize,
        panes: [
            { collapsible: false, size: "100%" },
            { collapsible: false, size: "0%" }
        ]
    });
 
    grid = $("#grid").kendoGrid({
        resizable: true,
        columns: [
            { field: "Id", title: "Id", hidden: true , menu: false},
            { field: "StudyName", title: "Study Name" },
            { field: "Psubjid", title: "Psubjid" },
            { field: "MatchId", title: "Match Id", filterable: false },
            { field: "MatchSources", title: "Match Source" },
            { field: "Field", title: "Field" },
            { field: "ArgusValue", title: "Argus Value" },
            { field: "CricitValue", title: "Cricit Value" },
            { field: "ArgusCaseNum", title: "Argus Case Number" },
            { field: "Status", title: "Status", editor: statusEditorInitialize },
            { field: "DmComments", title: "DM Comments", editor: textEditorInitialize, filterable: false },
            { field: "PvComments", title: "PV Comments", editor: textEditorInitialize, filterable: false },
            { field: "UsubjId", title: "USUBJID" },
            { field: "ValuesMatch", title: "Values Match" },
            { field: "DateCreated", title: "Date Created", format: "{0:MM/dd/yyyy}" },
            {
                command: [
                {
                    name: "edit",
                    text: { edit: " ", cancel: "cancel", update: " " }
                }
                ]
                , title: " ", width: "100px"
            }
        ],
        columnMenu: {
            sortable: true,
            filterable: {
                messages: {
                    selectValue: "Select category"
                }
            },
            columns: true,
            messages: {
                columns: "Choose columns",
                filter: "Apply filter",
                sortAscending: "Sort (asc)",
                sortDescending: "Sort (desc)"
            }
        },
        pageable: false,
        sortable: {
            mode: "multiple",
            allowUnsort: true,
        },
        filterable: true,
        editable: "inline",
        cancel: function (e) {
            this.refresh();
        },
        toolbar: [
        { name: "cancel", text: "Cancel" }
        ],
        dataSource: {
            data: testdata,
            serverPaging: false,
            serverFiltering: false,
            serverSorting: false,
            pageSize: 500,
            schema: {
                model: {
                    id: "Id",
                    fields: {
                        Id: { editable: false },
                        StudyName: { type: "string", editable: false},
                        Psubjid: { type: "string", editable: false },
                        MatchId: { type: "string", editable: false },
                        MatchSources: { type: "string", editable: false },
                        Field: { type: "string", editable: false },
                        ArgusValue: { type: "string", editable: false },
                        CricitValue: { type: "string", editable: false },
                        ArgusCaseNum: { type: "string", editable: false },
                        Status: { type: "string" },
                        DmComments: { type: "string" },
                        PvComments: { type: "string" },
                        ValuesMatch: { type: "string", editable: false },
                        UsubjId: { type: "string", editable: false },
                        DateCreated: { type: "date", editable: false },
                    }
                }
            },
            batch: false,
            error: function (e) {
                alert("The action failed.\nStatus Text: " + e.xhr.statusText + "\nStatus: " + e.xhr.status + "\nError Message: " + e.xhr.responseText)
                this.cancelChanges();
            }
        }
    });
 
});
 
 
 
var openWebPlayer = function () {
    var webPlayerCustomization = new spotfire.webPlayer.Customization();
    webPlayerCustomization.showCustomizableHeader = false;
    webPlayerCustomization.showTopHeader = false;
    webPlayerCustomization.showClose = false;
    webPlayerCustomization.showAnalysisInfo = false;
    webPlayerCustomization.showToolBar = false;
    webPlayerCustomization.showExportFile = false;
    webPlayerCustomization.showExportVisualization = false;
    webPlayerCustomization.showUndoRedo = false;
    webPlayerCustomization.showDodPanel = false;
    webPlayerCustomization.showFilterPanel = true;
    webPlayerCustomization.showPageNavigation = true;
    webPlayerCustomization.showStatusBar = false;
 
    webPlayer = new spotfire.webPlayer.Application(webPlayerRelativePath, webPlayerCustomization);
 
    var onError = function (errorCode, description) {
        //log('<span style="color: red;">[' + errorCode + "]: " + description + "</span>");
    };
 
    var onOpened = function (analysisDocument) {
        resize();
 
        webPlayer.analysisDocument.marking.onChanged(
        "Marking",
        "Field Level Merge",
        ["DISCREPANCY_ID",
            "STUDY_NAME",
            "USUBJID",
            "SUBJID",
            "STATUS",
            "FIELD_NAME",
            "Values Match?",
            "ARGUS FIELD_VALUE",
            "CRICIT FIELD_VALUE",
            "ARGUS CASE_NUM",
            "Match Sources",
            "Match ID",
            "DM_COMMENTS",
            "PV_COMMENTS",
            "DATE_CREATED"
        ],
        500,
        onMarkingChangedCallback);
 
    };
 
    webPlayer.onError(onError);
    webPlayer.onOpened(onOpened);
    webPlayer.open(analysisPath, "webPlayerDiv", "");
};
 
String.format = function () {
    var s = arguments[0];
    for (var i = 0; i < arguments.length - 1; i++) {
        var reg = new RegExp("\\{" + i + "\\}", "gm");
        s = s.replace(reg, arguments[i + 1]);
    }
    return s;
}
 
function onMarkingChangedCallback(marking) {
    if (marking["USUBJID"] !== undefined) {
        var rows = marking["USUBJID"].length;
 
        var data = [],
        now = new Date();
        for (var i = 0; i < rows; i++) {
            var tmpId = getDiscrepancyIdMarkingData(i, marking);
            var tmpValuesMatch = getMarkingData("Values Match?", i, marking);
            var tmpStatus = getMarkingData("STATUS", i, marking);
            if (tmpStatus === "Unknown") {
                tmpStatus = "Open"
            }
            var pushIt = false;
            var isNew = false;
 
            if (tmpId > 0) {
                pushIt = true;
            } else if (tmpId == 0 && tmpValuesMatch == "N") {
                pushIt = true;
                isNew = true;
            }
            if (pushIt && !isNew) {
 
                data.push({
                    Id: tmpId,
                    StudyName: getMarkingData("STUDY_NAME", i, marking),
                    UsubjId: getMarkingData("USUBJID", i, marking),
                    Psubjid: getMarkingData("SUBJID", i, marking),
                    Field: getMarkingData("FIELD_NAME", i, marking),
                    ValuesMatch: tmpValuesMatch,
                    ArgusValue: getMarkingData("ARGUS FIELD_VALUE", i, marking),
                    CricitValue: getMarkingData("CRICIT FIELD_VALUE", i, marking),
                    ArgusCaseNum: getMarkingData("ARGUS CASE_NUM", i, marking),
                    MatchSources: getMarkingData("Match Sources", i, marking),
                    MatchId: getMarkingData("Match ID", i, marking),
                    Status: tmpStatus,
                    DmComments: getMarkingData("DM_COMMENTS", i, marking),
                    PVComments: getMarkingData("PV_COMMENTS", i, marking),
                    DateCreated: getMarkingData("DATE_CREATED", i, marking)
                });
            } else if (pushIt && isNew)
            {
                data.push({
                    StudyName: getMarkingData("STUDY_NAME", i, marking),
                    UsubjId: getMarkingData("USUBJID", i, marking),
                    Psubjid: getMarkingData("SUBJID", i, marking),
                    Field: getMarkingData("FIELD_NAME", i, marking),
                    ValuesMatch: tmpValuesMatch,
                    ArgusValue: getMarkingData("ARGUS FIELD_VALUE", i, marking),
                    CricitValue: getMarkingData("CRICIT FIELD_VALUE", i, marking),
                    ArgusCaseNum: getMarkingData("ARGUS CASE_NUM", i, marking),
                    MatchSources: getMarkingData("Match Sources", i, marking),
                    MatchId: getMarkingData("Match ID", i, marking),
                    Status: tmpStatus,
                    DmComments: getMarkingData("DM_COMMENTS", i, marking),
                    PVComments: getMarkingData("PV_COMMENTS", i, marking),
                    DateCreated: getMarkingData("DATE_CREATED", i, marking)
                });
            }
        }
 
        try {
            BindData(data);
        } catch (e) {
            alert(e);
        }
    }
}
 
var getDiscrepancyIdMarkingData = function (i, marking) {
    var returnValue = null;
    try {
        returnValue = marking["DISCREPANCY_ID"][i];
    } catch (e) {
        returnValue = 0;
    }
 
    if (returnValue === "(Empty)") {
        return 0;
    }
    return returnValue;
}
 
 
var getMarkingData = function (field, i, marking) {
    var returnValue = null;
    try {
        returnValue = marking[field][i];
    } catch (e) {
        returnValue = null;
    }
 
    if (returnValue === "(Empty)" || returnValue === "Unknown") {
        return null;
    }
    return returnValue;
}
 
 
 
var resize = function () {
 
     
    var webPlayerDiv = document.getElementById("webPlayerDiv");
    var reconcileDiv = document.getElementById("reconcileDiv");
 
 
    var width = document.documentElement.offsetWidth;
    var height = document.documentElement.offsetHeight;
    var windowHeight = $(window).height();
    var windowWidth = $(window).width();
    var TheSplitterContainerH = $("#TheSplitterContainer").height();
    var TheSplitterContainerW = $("#TheSplitterContainer").width();
    /*****************************/
    var gridElement = $("#grid");
    var dataArea = gridElement.find(".k-grid-content");
    var newHeight = gridElement.parent().innerHeight() - 2;
    var diff = gridElement.innerHeight() - dataArea.innerHeight();
 
 
    $("#clientHeightDiv").text("Client H/W: " + height + "/" + width);
    $("#windowHeightDiv").text("Window H/W: " + windowHeight + "/" + windowWidth);
    $("#filteringSizeDiv").text("Filtering H/W: " + document.getElementById('filtering').offsetHeight + "/" + document.getElementById('filtering').offsetWidth);
    $("#TheSplitterContainerSizeDiv").text("TheSplitterContainer H/W: " + TheSplitterContainerH + "/" + TheSplitterContainerW);
 
    $("#TheGridSizeDiv").text("TheGridSize H/W: " + gridElement.parent().offsetHeight + "/" + gridElement.parent().offsetWidth);
    $("#TheGridDataAreaDiv").text("TheGridDataArea H/W: " + dataArea.height() + "/" + dataArea.innerWidth());
 
    $("#splitterSizeDiv").text("splitterSizeDiv H/W: " + document.getElementById('vertical').offsetHeight + "/" + document.getElementById('vertical').offsetWidth);
    $("#top-paneSizeDiv").text("Top Panel H/W: " + document.getElementById('top-pane').offsetHeight + "/" + document.getElementById('top-pane').offsetWidth);
    $("#reconcileSizeDiv").text("Reconciliaton H/W: " + document.getElementById('reconcileDiv').offsetHeight + "/" + document.getElementById('reconcileDiv').offsetWidth);
    $("#bottom-paneSizeDiv").text("Bottom Panel H/W: " + document.getElementById('bottom-pane').offsetHeight + "/" + document.getElementById('bottom-pane').offsetWidth);
    $("#webPlayerSizeDiv").text("Web Player H/W: " + document.getElementById('webPlayerDiv').offsetHeight + "/" + document.getElementById('webPlayerDiv').offsetWidth);
 
 
    resizeSplitter();
};
 
 
window.onresize = function () {
    resize();
};

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 15 Nov 2013, 09:29 AM
Hello Jeff,

The resizeSplitter function is called before the Splitter has been initialized.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Splitter
Asked by
Jeff
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or