jQuery UI Widgets Forums Grid Grid not loading

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 8 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Grid not loading #84261

    Zaid Alam
    Participant

    My code was working yesterday and now its not working on my local server , although its still working on my remote server, it gives no error and it even gets the data , I have no clue why the grid is not loading any more

    var source =
    {
    updaterow: function (rowid, rowdata, commit) {
    // that function is called after each edit.

    var html = ”;
    var rowindex = $(“#jqxgrid”).jqxGrid(‘getrowboundindexbyid’, rowid);
    index = editedRows.map(function (e) { return e.index; }).indexOf(rowid)
    if (index != -1) {
    editedRows[index] = { index: rowindex, data: rowdata }
    } else {
    editedRows.push({ index: rowindex, data: rowdata });
    }
    if (editedRows.length > 0) {
    $(‘#send_review’).removeClass(‘disabled’); // Disables visually
    $(‘#send_review’).prop(‘disabled’, false); // Disables visually + functionally
    }
    commit(true);
    },
    async: false,
    url: ‘/GUI/Bioactivities.aspx/Bioactivity_Search’,
    datatype: “json”
    };

    var dataAdapter = new $.jqx.dataAdapter(source,
    {

    contentType: ‘application/json; charset=utf-8’,
    loadServerData: function (serverdata, source, callback) {
    $.ajax({
    type: “POST”,
    contentType: “application/json; charset=utf-8”,
    url:source.url,
    data: “{‘searchitem’:'” + get(‘id’) + “‘, ‘category’:'” + get(‘category’) + “‘}”,
    dataType: “json”,
    success: function (data) {

    var json = jQuery.parseJSON(data.d);

    callback({ records: json });
    }

    });
    },

    }
    );
    $(“#jqxgrid”).jqxGrid(
    {
    width: ‘100%’,
    height: ‘70%’,
    source: dataAdapter,
    filterable: true,
    sortable: true,
    editable: true,
    theme: ‘bootstrap’,
    selectionmode: ‘multiplecellsadvanced’,
    pageable: true,
    columnsresize: true,
    enabletooltips: true,
    autoheight: true,
    altrows: true,
    autoshowfiltericon: false,
    ready: function () {
    $(“#jqxgrid”).jqxGrid({ pagesize: 25 });
    },

    pagesizeoptions: [’25’, ’50’, ‘100’],

    columns: [

    { text: ‘Compound ID’, datafield: ‘compound_id’, width: 200, cellsrenderer: linkrenderer, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘Standard inchi key’, datafield: ‘standard_inchi_key’, width: 250, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘Compound name’, datafield: ‘compound_name’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘Uniprot ID’, datafield: ‘target_id’, width: 200, cellsrenderer: linkrenderer, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘Target Pref Name’, datafield: ‘target_pref_name’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘Gene Name’, datafield: ‘gene_names’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },

    {
    text: “Wild type or mutant”, datafield: ‘wildtype_or_mutant’, width: 200, columntype: ‘dropdownlist’, cellclassname: cellclass, cellvaluechanging: cellvaluechanging,
    initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: [“Wild”, “Mutant”] });
    }
    },
    { text: “Mutation information”, datafield: “mut_info”, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },

    { text: ‘PubMed ID’, datafield: ‘pubmed_id’, width: 200, cellsrenderer: linkrenderer, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    // { text: ‘PubMed ID’, datafield: ‘pubmed_id’, width: 200 },
    { text: ‘End Point Standard Type’, datafield: ‘ep_standard_type’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘End Point Standard Relation’, datafield: ‘ep_standard_relation’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘End Point Standard Value’, datafield: ‘ep_standard_value’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘End Point Standard Units’, datafield: ‘ep_standard_units’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    {
    text: “Endpoint Mode of Action”, datafield: ‘endpoint_actionmode_id’, width: 200, columntype: ‘dropdownlist’, cellclassname: cellclass, cellvaluechanging: cellvaluechanging,
    initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: [“activation”, “cytotoxocity”, “growth_inhibition”, “inhibition”, “inverse_agonist”] });
    }
    },

    {
    text: “Assay Format”, datafield: ‘assay_format_id’, width: 200, columntype: ‘dropdownlist’, cellclassname: cellclass, cellvaluechanging: cellvaluechanging,
    initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: [“biochemical”, “cell_based”, “cell_free”, “physiochemical”, “tissue”, “organism_based”] });
    }
    },
    {
    text: “Assay Type”, datafield: ‘assay_type_id’, width: 200, columntype: ‘dropdownlist’, cellclassname: cellclass, cellvaluechanging: cellvaluechanging,
    initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: [“functional”, “binding”, “phenotypic”] });
    }
    },
    {
    text: “Assay Sub Type”, datafield: ‘assay_sub_type_id’, width: 200, columntype: ‘dropdownlist’, cellclassname: cellclass, cellvaluechanging: cellvaluechanging,
    initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: [“binding_reversible”, “binding_irreversible”, “enzyme_activity”, “process”, “reporter_gene”, “signalling”, “uptake”, “viability”] });
    }
    },
    {
    text: “Inhibitor Type”, datafield: ‘inhibitor_type_id’, width: 200, columntype: ‘dropdownlist’, cellclassname: cellclass, cellvaluechanging: cellvaluechanging,
    initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: [“competitive_inhibitor”, “non_competitive_inhibitor”, “allosteric_inhibitor”] });
    }
    },
    {
    text: “Detection Technology”, datafield: ‘detection_technology_id’, width: 200, columntype: ‘dropdownlist’, cellclassname: cellclass, cellvaluechanging: cellvaluechanging,
    initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: [“fluoresecence”, “luminescence”, “spectrophotometry”, “radiometry”, “microscopy”, “label_free_technology”, “fluorescence_polarization”, “TRF”, “TR_FRET”, “AlphaScreen”, “qPCR”, “termal_shift”] });
    }
    },
    { text: ‘Compound concentration value’, datafield: ‘compound_single_conc_value’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: ‘Compound concentration value units’, datafield: ‘cscv_stand_unit’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Substrate type”, datafield: “substrate_type”, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Substrate Type Standard Relation”, datafield: “subs_standard_relation”, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Substrate Type Standard Value”, datafield: “subs_standard_value”, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Substrate Type Standard Units”, datafield: “subs_stand_units”, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Assay cell line”, datafield: ‘assay_cell_line’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Assay Description”, datafield: ‘assay_description’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Activity Comments”, datafield: ‘activity_comment’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },

    { text: “Title”, datafield: “title”, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Journal”, datafield: “journal”, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Year”, datafield: ‘_year’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Volume”, datafield: ‘volume’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Issue”, datafield: ‘issue’, width: 200 },
    { text: “Authors”, datafield: ‘authors’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Annotation Comments”, datafield: ‘annotation_comments’, width: 300 },

    { text: “Assay ID”, datafield: ‘assay_id’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },

    { text: “Local Target ID”, datafield: ‘tid’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Activity ID”, datafield: ‘activity_id’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Molregno”, datafield: ‘molregno’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Record ID”, datafield: ‘record_id’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging },
    { text: “Document ID”, datafield: ‘doc_id’, width: 200, cellclassname: cellclass, cellvaluechanging: cellvaluechanging }

    ]
    });

    Grid not loading #84280

    Dimitar
    Participant

    Hello Zaid Alam,

    Please share more details. Is an empty grid displayed or is it not displayed at all? Have you made any HTML or CSS changes to your “local” grid page? Or could the data you receive from ‘/GUI/Bioactivities.aspx/Bioactivity_Search’ be somehow corrupted?

    We are looking forward to your reply.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.