PropertyEventMethodIndex
WebSquare.uiplugin.linkedDataList - 5.0_4.4547B.20211124.201933

Saves only the filtered data of the DataList and the sorted data.
Use the LinkedDataList when using the filtered data of the DataList as selection items of the following components:
- AutoComplete
- CheckBox
- CheckComboBox
- MultiSelect
- Radio
- SelectBox
Less than 1,00 data in DataList is recommended, and maximum 10,000 data can be supported.

Type

uiplugin

Property Summary

bind
DataList ID to bind with the LinkedDataList
id
ID of the LinkedDataList
rowStatusNodeName
Sets the name of the rowStatus key (node) when getting the data in JSON or XML format. The default is rowStatus.
userData1
User-defined property
userData2
User-defined property
userData3
User-defined property

Event Summary

Method Summary

clearFilter( )
Cancels the filtering status set in the linkedDataList.
clearSort( )
Cancels all sorting in linkedDataList.
clearSortFilter( )
Cancels the filter of the sorted data set in the linkedDataList.
getAllData( )
Returns the entire data of the linked DataList as an array.
getAllFilteredData( )
Returns an array containing all filteredData of the specified filterRowIndex in the linkedDataList.
getAllFilteredJSON( )
Returns all filtered data of the filtered row in the linkedDataList as a JSON object.
getAllFilteredXML( options )
Returns an XML containing all filteredData of the specified filteredRow in the linkedDataList.
getAllJSON( )
Returns all data of the linkedDataList as JSON object.
getAllNoFilteredData( )
Gets all unfiltered data from the linkedDataList.
getAllXML( )
Returns the entire data of the linkedDataList in XML.
getCellData( rowIndex , colIndex )
Returns the data of the cell of the corresponding row index and the column index.
getColData( colID )
Returns the data of the rows of the corresponding column index or ID as an array (without filtering or sorting).
getColumnDistinctDataArray( colIndex )
Removes overlapping data in the column of the corresponding index or ID, and returns the data sorted in ascending order as an array.
getDataLength( )
Returns the number of the currently displayed rows. Same as getRowCount().
getDataRow( filteredRowIndex )
Returns the data of the row of the corresponding row index in hash format in which the column ID is used as the key.
getDeletedData( )
A two-dimensional array of the rows in deleted, removed, or inserted and deleted status (such as D, E, or V)
getDeletedIndex( )
Returns an array containing the indices of the rows in the Deleted status.
getDeletedJSON( )
Returns the data of the rows in a deletedd status as a JSON object.
getDeletedXML( )
Returns the data of the rows in deleted status (D, E, or V) as an XML.
getFilterCondition( )
Returns the filterCondition o f the linkedDataList.
getFilteredColData( colIndex )
Returns the column data of the specified FilteredRow as an array.
getFilteredRowIndex( realRowIndex )
Returns the index of the row that has been filtered.
getFusionChartData( chartType , labelColumn , seriesColumns )
Returns the linkedDataList as JSON data for the FusionChart component.
getID( )
Returns the ID of the linkedDataList object.
getInsertedData( )
Returns an array containing the data of the rows that is in inserted (or C) status.
getInsertedIndex( )
Returns the indices of the rows in inserted (or C) status as an array.
getInsertedJSON( )
Converts the data of the rows in Inserted status into JSON and returns them as an array.
getInsertedXML( )
Converts the data of the rows in Inserted status (or C) as an XML.
getLinkedRealRowIndex( filteredRowIndex )
The reaRowIndex when the linkedDataList is assumed as an independent data set starting from 0. Mostly used for the drill-down.
getMatchedColumnData( matchCol , dataValue , targetCol , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which matchCol is dataValue among the rows between stRowIndex and lastRowIndex as a one-dimensional array.
getMatchedData( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex as a two-dimensional array.
getMatchedIndex( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the indices the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex.
getMatchedJSON( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the JSON data containing the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex.
getMatchedXML( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex as an XML.
getModifiedData( )
Returns the data of the rows in a modified status such as (C, U, D or E) as an array.
getModifiedIndex( )
Returns the indices of the rows in a modified status such as (C, U, or D) as an array.
getModifiedJSON( )
Converts the data of the rows in updated, inserted, deleted, or removed status (U, C, D, E, 1, 2, 3, or 5) into JSON and returns them as a one-dimensional array.
getModifiedXML( )
Returns the data of the rows in updated, inserted, deleted, or removed status (U, C, D, E, 1, 2, 3, or 5) into an XML.
getObjectType( )
Returns the type of the DataCollection.
getOption( attr )
Returns the attributes defined for the linkedDataList.
getOriginalCellData( filteredRowIndex , colID )
Returns the initial data of the cell of the corresponding filteredRowIndex and the colID.
getParentRealRowIndex( linkedRealRowIndex )
Returns the actual realRowIndex (same as the rowIndex of the referenced dataList) through the linkedRealRowIndex (the realRowIndex of the linkedDataList).
getParentRowIndex( rowIndex )
Returns the rowIndex of the parent row when the drilldown is used.
getRangeData( from , to )
Returns the data of the rows in the specified range as an array.
getRangeJSON( from , to )
Returns the data of the rows within the range as a JSON object.
getRangeXML( from , to )
Returns the data of the rows in the specified range as an XML.
getRealRowIndex( filteredRowIndex )
Returns the filteredRowIndex of the actual data for the filteredRowIndex.
getRowCount( )
Returns the number of the rows in the linkedDataList.
getRowData( filteredRowIndex )
Returns the data or the rows of the corresponding rowIndex as an array.
getRowIndexByStatus( statusStr )
Returns the indices of the rows of the corresponding status (or code).
getRowJSON( filteredRowIndex )
Returns the data of the row of the corresponding filteredRowIndex as a JSON object.
getRowStatus( filteredRowIndex )
Returns the status of the row of the corresponding rowIndex. (Default:"R", Updated:"U", Inserted:"C", Deleted:"D", Inserted and Deleted:"V")
getRowStatusValue( filteredRowIndex )
Returns the status of the row of the specified filteredRowIndex. (Default:0, Updated:1, Inserted:2, Deleted:3, Inserted and Deleted:4)
getRowXML( filteredRowIndex )
Returns the data of the row of the corresponding filteredRowIndex as an XML.
getScope( )
Returns the parent WFrame object when the component is a child of the WFrame which uses the scope feature (scope=true). Returns null if not the child of the scoping-enabled (scope=true) WFrame.
getScopeWindow( )
Returns the scope object of the parent when the component is a child of the WFrame which uses the scope feature (scope=true). Returns the window object if not a child of the scoping-enabled (scope=true) WFrame.
getSortCondition( )
Returns the sortCondition of the linkedDataList.
getTotalCol( )
Returns the number of the columns.
getTotalRow( )
Returns the total number of the rows.
getUnmatchedColumnData( matchCol , dataValue , targetCol , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the targetCol of which rowIndex of the specified matchCol is not same as dataValue among the rows between stRowIndex and lastRowIndex as an array.
getUnmatchedData( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex as an array.
getUnmatchedIndex( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the indices of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex as an array.
getUnmatchedJSON( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Converts the data of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex into JSON and returns as an array.
getUnmatchedXML( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex as an XML.
getUpdatedData( )
Returns the data of the rows in the updated status as an array.
getUpdatedIndex( )
Returns the indices of the rows in the updated status (1 or U) as an array.
getUpdatedJSON( )
Converts the data of the rows in updated status (1 or U) into JSON and returns as an array.
getUpdatedXML( )
Returns the data of the rows in update status (1 or U) as an XML.
multisort( options )
Sorts multiple columns according to the specified option.
removeColumnFilter( colID )
Cancels filtering in the row of the colID.
removeColumnFilterAll( )
Cancels filtering in the row of the colID.
setColumnFilter( filterOptions )
Applies filtering to the column of the corresponding colIndex.
setCondition( type , condition )
Set the filtering or sorting conditions for the LinkedDataList.
setOption( key , value )
Sets the options of the linkedDataList object.
sort( bodyColumnID , sortType )
Sorts the column of the bodyColumnID in the linkedDataList.

Property Detail

bind
DataList ID to bind with the LinkedDataList
id
ID of the LinkedDataList
rowStatusNodeName
Sets the name of the rowStatus key (node) when getting the data in JSON or XML format. The default is rowStatus.
userData1
User-defined property. Use getUserData("userData3") to get the data. // Example getUserData("userData1");
userData2
User-defined property. Use getUserData("userData2") to get the data. // Example getUserData("userData2");
userData3
User-defined property. Use getUserData("userData3") to get the data. // Example getUserData("userData3");

Event Detail

Method Detail

clearFilter( )
Initializes the filter set in the linkedDataList.
clearSort( )
Cancels all sorting in linkedDataList.
Sample
linkedDataList1.clearSort(); // Cancel sorting.
clearSortFilter( )
Cancels the filter of the sorted data set in the linkedDataList.
getAllData( )
Returns the entire data of the linked DataList as an array.
Return
typedescription
ObjectOne-dimensional array containing the data of the linkedDataList
Sample
// The linkedDataList has five columns of a, b, c, d, and e, and total 20 rows. var returnArr = linkedDataList1.getAllData(); returnArr.length is 100. returnArr[0] is the value of the colum a on the first row. returnArr[1] is the value of the column b on the first row. ... returnArr[5] is the value of the column a on the second row. ...
getAllFilteredData( )
Returns an array containing all filteredData of the specified filterRowIndex in the linkedDataList.
Return
typedescription
ObjectOne-dimensional array containing the data of the linkedDataList
getAllFilteredJSON( )
Returns all filtered data of the filtered row in the linkedDataList as a JSON object.
Return
typedescription
ObjectJSON object of the linkedDataList
getAllFilteredXML( options )
Returns an XML containing all filteredData of the specified filteredRow in the linkedDataList.
Parameter
nametyperequireddescription
optionsObjectY
Return
typedescription
Xml ElementData of the linkedDataList
getAllJSON( )
Returns all data of the linkedDataList as JSON object.
Return
typedescription
ObjectJSON object of the linkedDataList
Sample
// The linkedDataList has five columns of a, b, c, d, and e. var returnJSONStr = JSON.stringify(linkedDataList1.getAllJSON()); baseNode : gridData , repeatNode : vector , valueNode : value, The returnXMLStr is as shown below. [{"a":"20120101","b":"23456","c":"Inswave","d":"WebSquare","e":"sample"}, {"a":"20120102","b":"34567","c":"Inswave","d":"WebSquare","e":"sample2"} ... (Omitted.) ]
getAllNoFilteredData( )
Gets all unfiltered data from the linkedDataList.
Return
typedescription
ObjectOne-dimensional array containing the data of the linkedDataList
getAllXML( )
Returns the entire data of the linkedDataList in XML.
Return
typedescription
Xml ElementData of the linkedDataList
Sample
// The linkedDataList has five columns of a, b, c, d, and e. var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getAllXML()); baseNode : gridData , repeatNode : vector , valueNode : value, The returnXMLStr is as shown below. <gridData> <vector status="0" statusValue="R" id="0"> <a value = "20120101"/> <b value = "23456"/> <c value = "Inswave"/> <d value = "WebSquare"/> <e value = "sample"/> </vector> <vector status="0" statusValue="R" id="1"> <a value = "20120102"/> <b value = "34567"/> <c value = "Inswave"/> <d value = "WebSquare"/> <e value = "sample2"/> </vector> ... (Omitted.) </gridData>
getCellData( rowIndex , colIndex )
Returns the data of the cell of the corresponding row index and the column index.
Parameter
nametyperequireddescription
rowIndexNumberYRow index of the cell
colIndexStringYColumn index or ID of the cell
Return
typedescription
StringCell data of the corresponding rowIndex and colIndex
Sample
var returnValue = linkedDataList1.getCellData(0, "a"); // Return the data of the cell on the first row and column a.
getColData( colID )
Returns the data of the rows of the corresponding column index or ID as an array (without filtering or sorting).
Parameter
nametyperequireddescription
colIDNumberYColumn index or ID of the cell
Return
typedescription
ObjectArray containing the data of the rows of the specified colIndex
Sample
var returnArr = linkedDataList.getColData('a'); // The returnArr is the array containing the data of column a.
getColumnDistinctDataArray( colIndex )
Removes overlapping data in the column of the corresponding index or ID, and returns the data sorted in ascending order as an array.
Parameter
nametyperequireddescription
colIndexNumberYIndex or ID of the col with overlapping data being removed
Return
typedescription
ObjectData array
getDataLength( )
Returns the number of the currently displayed rows. Same as getRowCount().
Return
typedescription
numberNumber of the rows
getDataRow( filteredRowIndex )
Returns the data of the row of the corresponding row index in hash format in which the column ID is used as the key.
Parameter
nametyperequireddescription
filteredRowIndexNumberYIndex of the row to get the data from
Return
typedescription
ObjectArray of the row data of the specified filteredRowIndex
Sample
// The linkedDataList1 has IDs of a, b, c, d, and e. The dataType of column a is date, and of column b is number. Each has the displayFormat of yyyy.MM.dd and #,###. // The first row has the column data shown below. ( 20120101 , 23456 , Inswave , WebSquare , sample ) var dataHash = linkedDataList1.getDataRow(0); for(var i in dataHash){ alert( i + ' : ' + dataHash[i] ); } The output is as shown below. a : 20120101 b : 23456 c : Inswave d : WebSquare e : sample
getDeletedData( )
A two-dimensional array of the rows in deleted, removed, or inserted and deleted status (such as D, E, or V)
Return
typedescription
ObjectTwo-dimensional data array of the rows in deleted status
Sample
var returnArr = linkedDataList1.getDeletedData(); // The returnArr is the array containing the data of the rows in deleted status (3,4, D,V).
getDeletedIndex( )
Returns an array containing the indices of the rows in the Deleted status.
Return
typedescription
ObjectArray containing the indices of the rows in the Deleted status
Sample
var returnArr = linkedDataList1.getDeletedIndex(); // The returnArr is the array of the rows in the Deleted status (3,4, D,V).
getDeletedJSON( )
Returns the data of the rows in a deletedd status as a JSON object.
Return
typedescription
ObjectJSON object containing data of the rows in a deleted status
Sample
var returnJsonStr = JSON.stringify(linkedDataList1.getDeletedJSON()); // The returnJsonStr is a JSON object containing data of the rows in a deleted status (3,4, D,V).
getDeletedXML( )
Returns the data of the rows in deleted status (D, E, or V) as an XML.
Return
typedescription
XML ElementXML containing the data of the rows in deleted status
Sample
var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getDeletedXML()); // The returnXMLStr is the XML containing the data of the rows in deleted status (3,4, D,V).
getFilterCondition( )
Returns the filterCondition o f the linkedDataList.
getFilteredColData( colIndex )
Returns the column data of the specified FilteredRow as an array.
Parameter
nametyperequireddescription
colIndexnumberY
Return
typedescription
ObjectArray of the filter data of colIndex
Sample
var returnArr = linkedDataList.getFilteredColData('a'); // The returnArr is the filter data array of column a.
getFilteredRowIndex( realRowIndex )
Returns the index of the row that has been filtered.
Parameter
nametyperequireddescription
realRowIndexNumberYIndex of the row that is not being filtered.
Return
typedescription
NumberIndex of the row that has been filtered.
getFusionChartData( chartType , labelColumn , seriesColumns )
Returns the linkedDataList as JSON data for the FusionChart component.
Parameter
nametyperequireddescription
chartTypeStringYType of the chart
labelColumnStringY"Column ID in the DataColleciton to be used as the label in the chart
seriesColumnsStringYColumn information in the DataCollection to be used as the series data in the chart. Array-type string.
Return
typedescription
ObjectConverted FusionChart data (JSON)
Sample
var chartData = linkedDataList1.getFusionChartData("column2D","Month","[['Year1','Year2']]"); chartObject.setJSONData(chartData);
getID( )
Returns the ID of the linkedDataList object.
Return
typedescription
StringReturns the ID of the linkedDataList object.
getInsertedData( )
Returns an array containing the data of the rows that is in inserted (or C) status.
Return
typedescription
Object(Two-dimensional) array containing the data of the rows that is in Inserted status
Sample
var returnArr = linkedDataList1.getInsertedData(); // The returnArr is an array containing the data of the rows that is in Inserted (or C) status.
getInsertedIndex( )
Returns the indices of the rows in inserted (or C) status as an array.
Return
typedescription
ObjectAn array of the index data of the rows in Inserted status.
Sample
var returnArr = linkedDataList1.getInsertedIndex(); // The returnArr is the array of the rows in Inserted status (2, C).
getInsertedJSON( )
Converts the data of the rows in Inserted status into JSON and returns them as an array.
Return
typedescription
ObjectOne-dimensional array of JSON data of the rows in Inserted status
Sample
var returnJsonStr = JSON.stringify(linkedDataList1.getInsertedJSON()); // The returnJsonStr is a JSON containing the data of the rows in the Inserted status (2, C).
getInsertedXML( )
Converts the data of the rows in Inserted status (or C) as an XML.
Return
typedescription
XML ElementXML of the rows in Inserted status
Sample
var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getInsertedXML()); // The returnXMLStr is a string containing the data in the Inserted status (2, C).
getLinkedRealRowIndex( filteredRowIndex )
The reaRowIndex when the linkedDataList is assumed as an independent data set starting from 0. Mostly used for the drill-down.
Parameter
nametyperequireddescription
filteredRowIndexNumberY
Return
typedescription
NumberThe realRowIndex of the linkedDataList
Sample
// Row of the dataList is [0,1,2,3,4,5,6,7,8,9] and the rows of the linkedDataList is [1,3,5,7,9]. The gridView bound with the linkedDataList has rows of [1,5,9]. linkedDataList1.getLinkedRealRowIndex(1); // 2 linkedDataList1.getRealRowIndex(1); // 5 linkedDataList1.getLinkedRealRowIndex(2); // 4 linkedDataList1.getRealRowIndex(2); // 9
getMatchedColumnData( matchCol , dataValue , targetCol , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which matchCol is dataValue among the rows between stRowIndex and lastRowIndex as a one-dimensional array.
Parameter
nametyperequireddescription
matchColNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of the row of corresponding colIndex
targetColNumberYIndex of the column to get the data from
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectOne-dimensional array that contains the data of the corresponding targetCol
Sample
var lastRowIndex = linkedDataList1.getRowCount() ; var returnArr = linkedDataList1.getMatchedColumnData( 'c', 'Movie', 'd', true, 0, lastRowIndex); // The returnArr is the data of column d of the specified row index with the value column c being Movie as an array.
getMatchedData( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex as a two-dimensional array.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of the row of corresponding colIndex
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectTwo-dimensional array containing the data of the searched rows
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnArr = linkedDataList1.getMatchedData( 'c', 'Movie', true, 0, lastRowIndex ); // The returnArr is an array containing the data of the rows of which colum C is Movie in the entire DataList.
getMatchedIndex( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the indices the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex.
Parameter
nametyperequireddescription
colIDStringYRow index or column ID to check the data
dataValueStringYData to compare with the data of colID
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectArray of the index data of the rows within the specified range
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnArr = linkedDataList1.getMatchedIndex( 'c', 'Movie', true, 0, lastRowIndex ); // The returnArr is the array of the row indices with "Movie" value in column c.
getMatchedJSON( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the JSON data containing the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of colID
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectJSON data of the rows within the specified range
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnJSONStr = JSON.stringify(linkedDataList1.getMatchedJSON( 'c', 'Movie', true, 0, lastRowIndex )); // The returnJSONStr is the JSON object containing the data of the rows of which column c has Movie in the linkedDataList.
getMatchedXML( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which colInfo is dataValue among the rows between stRowIndex and lastRowIndex as an XML.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of colID
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
Xml elementXML with the data within the specified range
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getMatchedXML( 'c', 'Movie', true, 0, lastRowIndex )); // The returnXMLStr is the XML containing the data of the rows of which column c is Movie in the linkedDataList.
getModifiedData( )
Returns the data of the rows in a modified status such as (C, U, D or E) as an array.
Return
typedescription
ObjectTwo-dimensional array of the rows in modified status
Sample
var returnArr = linkedDataList1.getModifiedData(); // The returnArr is the array of the rows in a modified status (1,2,3, U,C,D).
getModifiedIndex( )
Returns the indices of the rows in a modified status such as (C, U, or D) as an array.
Return
typedescription
ObjectOne-dimensional array of the index data of the rows in modified status
Sample
var returnArr = linkedDataList1.getModifiedIndex(); // The returnArr is the array of the rows in updated, inserted, or deleted status(1,2,3, U,C,D).
getModifiedJSON( )
Converts the data of the rows in updated, inserted, deleted, or removed status (U, C, D, E, 1, 2, 3, or 5) into JSON and returns them as a one-dimensional array.
Return
typedescription
ObjectOne-dimensional array of the JSON data of the rows inserted, modified or removed.
Sample
var returnJSON = linkedDataList1.getModifiedJSON(); // The returnJSON will be the JSON object containing the data of the modified, inserted, and deleted status (1,2,3, U,C,D).
getModifiedXML( )
Returns the data of the rows in updated, inserted, deleted, or removed status (U, C, D, E, 1, 2, 3, or 5) into an XML.
Return
typedescription
Xml ElementRow data in modified status (inserted, updated, or deleted) as XML
Sample
var returnXML = linkedDataList1.getModifiedXML(); // The returnXML is the data of the modified rows (1,2,3, U,C,D) as XML.
getObjectType( )
Returns the type of the DataCollection.
Return
typedescription
StringReturns the dataCollection type. [dataMap, dataList, linkedDataList]
Sample
var dataCollectionType = linkedDataList1.getObjectType(); // Return the linkedDataList of which dataCollectionType is linkedDataList1.
getOption( attr )
Returns the attributes defined for the linkedDataList.
Parameter
nametyperequireddescription
attrStringYName of the attribute
Return
typedescription
StringReturns the attributes defined for the linkedDataList.
Sample
var key = "id" $p.data.linkedDataList.getOption(id); // If there is no attributes for the specified key of the highest-level object, null data will be returned.
getOriginalCellData( filteredRowIndex , colID )
Returns the initial data of the cell of the corresponding filteredRowIndex and the colID.
Parameter
nametyperequireddescription
filteredRowIndexNumberYIndex of the initial row of the cell
colIDStringYInitial column index or ID of the cell
Return
typedescription
StringCell data of the corresponding rowIndex and colIndex
Sample
var returnValue = linkedDataList.getOriginalCellData(0, "a"); // Return the initial data of column a in the first row without the displayFormat being applied.
getParentRealRowIndex( linkedRealRowIndex )
Returns the actual realRowIndex (same as the rowIndex of the referenced dataList) through the linkedRealRowIndex (the realRowIndex of the linkedDataList).
Parameter
nametyperequireddescription
linkedRealRowIndexNumberY
Return
typedescription
NumberRow index of the referenced dataList. realRowIndex.
Sample
// Row of the dataList is [0,1,2,3,4,5,6,7,8,9] and the rows of the linkedDataList is [1,3,5,7,9]. The gridView bound with the linkedDataList has rows of [1,5,9]. linkedDataList1.getParentRealRowIndex(0); // 1 linkedDataList1.getParentRealRowIndex(1); // 3 linkedDataList1.getParentRealRowIndex(2); // 5 linkedDataList1.getParentRealRowIndex(3); // 7 linkedDataList1.getParentRealRowIndex(4); // 9
getParentRowIndex( rowIndex )
Returns the rowIndex of the parent row when the drilldown is used.
Parameter
nametyperequireddescription
rowIndexNumberYNumber of the row to check the parent
Return
typedescription
NumberReturns the index of the parent row.
getRangeData( from , to )
Returns the data of the rows in the specified range as an array.
Parameter
nametyperequireddescription
fromNumberYFirst row index to get the data from
toNumberYLast row index to get the data from
Return
typedescription
Object(One-dimensional) array of the data within the specified range
Sample
// There are five columns with IDs of a, b, c, d, and e. The dataType of column a is date and column b is number, and the displayFormat of each is yyyy.MM.dd and #,### respectively. // Define each column of the first row. ( 20120101 , 23456 , Inswave , WebSquare , sample ) var dataArr = linkedDataList1.getRangeData(0, 1); dataArr.length is 5. dataArr[0] is 20120101. dataArr[1] is 23456. ...
getRangeJSON( from , to )
Returns the data of the rows within the range as a JSON object.
Parameter
nametyperequireddescription
fromNumberYFirst row index within the range to get the data from
toNumberYLast row index within the range to get the data from
Return
typedescription
ObjectRow data of the specified rowIndex as a JSON object
Sample
// There are five columns with IDs of a, b, c, d, and e. The dataType of column a is date and column b is number, and the displayFormat of each is yyyy.MM.dd and #,### respectively. // The first row has the column data shown below. ( 20120101 , 23456 , Inswave , WebSquare , sample ) var returnJSONStr = JSON.stringify(linkedDataList1.getRangeJSON(0, 1)); baseNode : gridData , repeatNode : vector , valueNode : value, The returnJSONStr is as shown below. [{"a":"20120101","b":"23456","c":"Inswave","d":"WebSquare","e":"sample"}, {"a":"20120102","b":"34567","c":"Inswave","d":"WebSquare","e":"sample2"}]
getRangeXML( from , to )
Returns the data of the rows in the specified range as an XML.
Parameter
nametyperequireddescription
fromNumberYFirst row index within the range to get the data from
toNumberYLast row index within the range to get the data from
Return
typedescription
Xml ElementXML data of the specified rowIndex"
Sample
// There are five columns with IDs of a, b, c, d, and e. The dataType of column a is date and column b is number, and the displayFormat of each is yyyy.MM.dd and #,### respectively. // Define each column of the first row. ( 20120101 , 23456 , Inswave , WebSquare , sample ) var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getRangeXML(0, 1)); baseNode : gridData , repeatNode : vector , valueNode : value, The returnXMLStr is as shown below. <gridData> <vector status="0" statusValue="R" id="0"> <a value = "20120101"/> <b value = "23456"/> <c value = "Inswave"/> <d value = "WebSquare"/> <e value = "sample"/> </vector> </gridData>
getRealRowIndex( filteredRowIndex )
Returns the filteredRowIndex of the actual data for the filteredRowIndex.
Parameter
nametyperequireddescription
filteredRowIndexNumberYRow index of the current cell
Sample
linkedDataList1.getRealRowIndex(3); // Actual filteredRowIndex for the third row.
getRowCount( )
Returns the number of the rows in the linkedDataList.
Return
typedescription
NumberNumber of the rows in the linkedDataList
Sample
var returnValue = linkedDataList.getRowCount(); // When there are 20 data rows in the linkedDataList, the returnValue will be 20.
getRowData( filteredRowIndex )
Returns the data or the rows of the corresponding rowIndex as an array.
Parameter
nametyperequireddescription
filteredRowIndexNumberYIndex of the row to get the data from
Return
typedescription
ObjectData array of the specified row
Sample
var dataArr = linkedDataList.getRowData( 0 ); // dataArr[0] is 20120101. // dataArr[1] is 23456. // The return is same as above.
getRowIndexByStatus( statusStr )
Returns the indices of the rows of the corresponding status (or code).
Parameter
nametyperequireddescription
statusStrStringYString to search the rows in the corresponding status
Return
typedescription
ObjectArray of the index data of the rows in statusStr status
Sample
var returnArr = linkedDataList1.getRowIndexByStatus('CUD'); // An array of rowIndex data of the rows in inserted, updated, or deleted status in the linkedDataList.
getRowJSON( filteredRowIndex )
Returns the data of the row of the corresponding filteredRowIndex as a JSON object.
Parameter
nametyperequireddescription
filteredRowIndexNumberYIndex of the row to get the data from
Return
typedescription
ObjectJSON object data of the corresponding row
Sample
// There are five columns with IDs of a, b, c, d, and e. The dataType of column a is date and column b is number, and the displayFormat of each is yyyy.MM.dd and #,### respectively. // The first row has the column data shown below. ( 20120101 , 23456 , Inswave , WebSquare , sample ) var returnJSONStr = JSON.stringify(linkedDataList1.getRowJSON(0)); baseNode : gridData , repeatNode : vector , valueNode : value, The returnJSONStr is as shown below. {"a":"20120101","b":"23456","c":"Inswave","d":"WebSquare","e":"sample","rowStatus":"U"}
getRowStatus( filteredRowIndex )
Returns the status of the row of the corresponding rowIndex. (Default:"R", Updated:"U", Inserted:"C", Deleted:"D", Inserted and Deleted:"V")
Parameter
nametyperequireddescription
filteredRowIndexNumberYRow index
Return
typedescription
StringStatus code of the row (Default:"R", Updated:"U", Inserted:"C", Deleted:"D", Inserted and Deleted:"V")
Sample
var returnValue = linkedDataList1.getRowStatus(0); // eturn the rowStatus of the first row.
getRowStatusValue( filteredRowIndex )
Returns the status of the row of the specified filteredRowIndex. (Default:0, Updated:1, Inserted:2, Deleted:3, Inserted and Deleted:4)
Parameter
nametyperequireddescription
filteredRowIndexNumberYRow index
Return
typedescription
NumberStatus of the row as a number (Default:0, Updated:1, Inserted:2, Deleted:3, Inserted and Deleted:4)
Sample
var returnValue = linkedDataList1.getRowStatusValue(0); // Return the rowStatus of the first row (as a number).
getRowXML( filteredRowIndex )
Returns the data of the row of the corresponding filteredRowIndex as an XML.
Parameter
nametyperequireddescription
filteredRowIndexNumberYIndex of the row to get the data from
Return
typedescription
XML ElementXML data of the row
Sample
// There are five columns with IDs of a, b, c, d, and e. The dataType of column a is date and column b is number, and the displayFormat of each is yyyy.MM.dd and #,### respectively. // Define each column of the first row. ( 20120101 , 23456 , Inswave , WebSquare , sample ) var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getRowXML(0)); baseNode : gridData , repeatNode : vector , valueNode : value, The returnXMLStr is as shown below. <vector status="0" statusValue="R" id="0"> <a value = "20120101"/> <b value = "23456"/> <c value = "Inswave"/> <d value = "WebSquare"/> <e value = "sample"/> </vector>
getScope( )
Returns the parent WFrame object when the component is a child of the WFrame which uses the scope feature (scope=true). Returns null when the component is not a child of the WFrame using the scope feature (scope=true).
Return
typedescription
Objectwframe object or null
Sample
// The main page contains wframe1 which contains wframe11 that is bound with linkedDataList1. linkedDataList1.getScope(); // Returns the wframe11 object.
getScopeWindow( )
Returns the scope object of the parent when the component is a child of the WFrame which uses the scope feature (scope=true). Returns a global window object when the component is not a child of the WFrame using the scope feature (scope=true.
Return
typedescription
ObjectScope object of the wframe object, or a global window object
Sample
// The main page contains wframe1 which contains wframe11 that is bound with linkedDataList1. var scope = linkedDataList1.getScopeWindow(); scope.wframe11 === linkedDataList1.getScope(); // true
getSortCondition( )
Returns the sortCondition of the linkedDataList.
getTotalCol( )
Returns the number of the columns.
Return
typedescription
NumberNumber of the columns
getTotalRow( )
Returns the total number of the rows.
Return
typedescription
NumberTotal number of the rows
getUnmatchedColumnData( matchCol , dataValue , targetCol , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the targetCol of which rowIndex of the specified matchCol is not same as dataValue among the rows between stRowIndex and lastRowIndex as an array.
Parameter
nametyperequireddescription
matchColNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of the row of corresponding colIndex
targetColNumberYIndex of the column to get the data from
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectOne-dimensional array that contains the data of the corresponding targetCol
Sample
var lastRowIndex = linkedDataList1.getRowCount() ; var returnArr = linkedDataList1.getUnmatchedColumnData( 'c', 'Movie', 'd', true, 0, lastRowIndex); // The returnArr is the data of column d of the row of which column c is not Movie.
getUnmatchedData( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex as an array.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of colID
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectTwo-dimensional array of the matching data within the range
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnArr = linkedDataList1.getUnmatchedData( 'c', 'Movie', true, 0, lastRowIndex ); // The returnArr is the data of the rows of which column c is not Movie in the linkedDataList as an array.
getUnmatchedIndex( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the indices of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex as an array.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of colID
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectArray of the index data of the rows within the specified range
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnArr = linkedDataList1.getUnmatchedIndex( 'c', 'Movie', false, 0, lastRowIndex ); // The returnArr is an array of the row indices of which column c has Movie in the entire linkedDataList.
getUnmatchedJSON( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Converts the data of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex into JSON and returns as an array.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of colID
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
ObjectJSON object with indices within the range
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnJSONStr = JSON.stringify(linkedDataList1.getUnmatchedJSON( 'c', 'Movie', true, 0, lastRowIndex )); // The returnJSONStr is a JSON object containing the data of the rows of which column c is not Movie in the linkedDataList.
getUnmatchedXML( colID , dataValue , exactMatch , stRowIndex , lastRowIndex )
Returns the data of the rows of which rowIndex of the specified column is not same as dataValue among the rows between stRowIndex and lastRowIndex as an XML.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to check the data
dataValueStringYData to compare with the data of colID
exactMatchBooleanYWhether they exactly match or not
stRowIndexNumberYFirst row index to get the data from
lastRowIndexNumberYLast row index to get the data from
Return
typedescription
Xml elementMatching XML data within the range
Sample
var lastRowIndex = linkedDataList1.getRowCount(); var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getUnmatchedXML( 'c', 'Movie', true, 0, lastRowIndex )); // Among the rows from Index 0 to Index 10, return the data of the rows of which birthday column does not include "Movie".
getUpdatedData( )
Returns the data of the rows in the updated status as an array.
Return
typedescription
ObjectTwo-dimensional array of the rows in updated status
Sample
var returnArr = linkedDataList1.getUpdatedData(); // The returnArr is the data of the rows in updated status (1, U).
getUpdatedIndex( )
Returns the indices of the rows in the updated status (1 or U) as an array.
Return
typedescription
ObjectArray of the indices of the rows in updated status (1 or U)
Sample
var returnArr = linkedDataList1.getUpdatedIndex(); // The returnArr is the array containing the data of the updated rows (1, U).
getUpdatedJSON( )
Converts the data of the rows in updated status (1 or U) into JSON and returns as an array.
Return
typedescription
ObjectJSON object of the rows in updated status (1 or U)
Sample
var returnJsonStr = JSON.stringify(linkedDataList1.getUpdatedJSON()); // The returnJsonStr is the array of JSON object of the rows in updated status (1, U).
getUpdatedXML( )
Returns the data of the rows in update status (1 or U) as an XML.
Return
typedescription
Xml ElementXML of the rows in updated status (1 or U)
Sample
var returnXMLStr = WebSquare.xml.indent(linkedDataList1.getUpdatedXML()); // The returnXMLStr is the XML of the row data in updated status (1, U).
multisort( options )
Sorts multiple columns according to the specified option.
Parameter
nametyperequireddescription
optionsObjectYJSON object containing sorting options
<String:Y> options.sortIndex : ID or index of the column to sort. Use the space key to separate multiple rows. <String:Y> options.sortOrder : Sorting type (1: Ascending -1: Descending). Use the space to separate the multiple columns.
Sample
var options = {}; options.sortIndex = "category member"; options.sortOrder = "1 1"; grid1.multisort( options ); Sort the category column in ascending order first, and then, sort the member column in ascending order. Multi-sorting can be done based on the dataType.
removeColumnFilter( colID )
Cancels filtering in the row of the colID.
Parameter
nametyperequireddescription
colIDNumberYRow index or column ID to cancel filtering
Sample
linkedDataList1.removeColumnFilter( 'c' ); // Cancel filtering in column c. hen using setColumnFilter in multiple columns, note the operationType of the uncancelled filter.
removeColumnFilterAll( )
Removes filtering from all columns.
Sample
linkedDataList1.removeColumnFilterAll(); // Remove filtering from all columns.
setColumnFilter( filterOptions )
Applies filtering to the column of the corresponding colIndex.
Parameter
nametyperequireddescription
filterOptionsObjectYFiltering option
<String:Y> filterOptions.type : Filter type ("func", "regExp") <String:Y> filterOptions.colIndex : Index or ID of the column to apply filtering <String:Y> filterOptions.key : Filtering key <String:Y> filterOptions.condition : Conditions to merge the previous filtered data. (“AND” or “OR”) <Boolean:N> filterOptions.exactMatch : Conducts equal search instead of like search in the row filter. (default:false) <Object:Y> filterOptions.param : arameter to be sent upon calling of the function specified in the key.
Sample
(Example 1) Row filtering // Filter the key data by indexOf. // The linkedDataList has five columns of a, b, c, d, and e. linkedDataList1.setColumnFilter( {type:'row', colIndex:'a', key:"Movie", condition:'and'}); nly the rows with colum a of which daa is Movie will be displayed. (Example 2) func filtering // Filters cellData, and returns true/false. // The linkedDataList has five columns of a, b, c, d, and e. linkedDataList1.setColumnFilter( {type:'func', colIndex:'a', key:function(cellData, param) { if(cellData.indexOf("Movie") > -1) { return true; }else{ return false} }, condition:'and',param:{}}); nly the rows with colum a of which daa is Movie will be displayed. (xample 3) regExp filter // Use a regular expression for filtering. // The linkedDataList has five columns of a, b, c, d, and e. linkedDataList1.setColumnFilter( {type:'regExp', colIndex:'a', key:/20120101|20120102|20120103/gi, condition:'and'}); Filters columns with column a containing 20120101, 20120102, or 20120103. User-defined regular expression can be sent as a key which must be set as regExp, not String.
setCondition( type , condition )
Set the filtering or sorting conditions for the LinkedDataList.
Parameter
nametyperequireddescription
typestringYOperation type - Filtering ("filter") or Sorting ("sort")
conditionstringYFiltering condition or sorting condition. (See the samples below.)
Sample
// Filtering Example linkedDataList1.setCondition("filter","filterCondition"); // Filtering Condition (1) // val(ComponentID) - Refers to the current value of the component defined in val(). // (Example) filterCondition = "column01 == val( 'selectbox1' )" // // Filtering Condition (2) // ref(data:DataCollectionObjectid.Column id) - Refers to the current value of the DataCollection object defined in ref(). // (Example) filterCondition = "column01 == ref( data:dataList1.col1)" // // Filtering Condition (3) // Default : Checks only the data of the specified column ID. // (Example) filtierCondition = "GENDER == 'W'" // Sorting Example linkedDataList1.setCondition("sort","sortCondition"); // In ascending powers // ASC(ColumnName) - Sorts the data of the column in ascending powers. // (Example) sortCondition = ASC('col0')" // In descending powers // DESC(Column Name) - Sorts the data of the column in descending powers. // (Example) sortCondition = DESC('col1, col2')
setOption( key , value )
Sets the options of the linkedDataList object.
Parameter
nametyperequireddescription
keyStringYName of the attribute
valueStringYName of the option
Sample
var key = "id"; var value = "linkedDataList1"; $p.data.linkedDataList1.setOption(key, value); // Note that there must be an option of the corresponding key value in the highest-level object.
sort( bodyColumnID , sortType )
Sorts the column of the bodyColumnID in the linkedDataList.
Parameter
nametyperequireddescription
bodyColumnIDStringYID of the column
sortTypeNumberYSorting option (0: Ascending, 1: Descending, 2: Unsort)
Sample
linkedDataList1.sort('date', 0); // Sort the column based on the value of the date column in ascending order. Using the sort function will consider all data as text regardless of the dataType. Use multisort to sort number-type columns.