GridResults

Component for presentation search results as grid view.

Simple demo application available here.

Summary
GridResultsComponent for presentation search results as grid view.
Functions
gridresultsConvert DIV panel into GridResults widget.
Types
Options
Functions
showResultsByRIDGet or set SMILES from/to the widget.

Functions

gridresults

Convert DIV panel into GridResults widget.

Parameters

optionsInitialization Options
$('#results').gridresults({
    pageSize: 10,
    columns: [
        { name: 'Structure', title: 'Structure' },
        { name: 'MF', title: 'Molecular Formula' },
        { name: 'MW', title: 'Molecular Weight'},
        { name: 'Name', title: 'Name'}
    ]
});

Types

Options

Properties

imgSizeWidth of the 2D molecule image.  Default value - 50
zoomSizeIf showTooltip enabled then specify the size of 2D molecule in the popup tooltip.  Default value - 150
showTooltipEnable or disable compound tooltip with additional compound information thet hover the 2D molecule component.  Enabled by default
pageSizeNumber of compound per page.  Devault value - 10
columnsSpecify the list of columns and the compound properties that should be presented in the grid view.  Columns titles are flexible and can be changed but the list of columns names is predifined and supporting only [CSID, Structure, MF, MW, Name, SysName, AM, MM, NM] at this moment.
onClickEvent that will be fired when the results row clicked
onResultsReadyEvent that will be fired when results are ready to be presented.

Functions

showResultsByRID

showResultsByRID: function (rid,
callback)

Get or set SMILES from/to the widget.  If the ‘smiles’ parameter is NULL then it returns SMILES of the chemical structure currently drawn in the widget, otherwise it sets value to the widget and draw molecule there.

Parameters

ridSearch request iid that was returned any search functions
var results = $("#searchResults")
    .gridresults({})
    .data("gridresults");

results.showResultsByRID(rid);
showResultsByRID: function (rid,
callback)
Get or set SMILES from/to the widget.