-
Getting Starteddiff --git a/book/en/apis/core/Cell.html b/book/en/apis/core/Cell.html index ec6d0624..7de67b45 100644 --- a/book/en/apis/core/Cell.html +++ b/book/en/apis/core/Cell.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/CellSpans.html b/book/en/apis/core/CellSpans.html index bc8aab2b..e4a91612 100644 --- a/book/en/apis/core/CellSpans.html +++ b/book/en/apis/core/CellSpans.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/ColumnStats.html b/book/en/apis/core/ColumnStats.html index 845e6c0d..7eb8a11e 100644 --- a/book/en/apis/core/ColumnStats.html +++ b/book/en/apis/core/ColumnStats.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/DataCache.html b/book/en/apis/core/DataCache.html index 14237836..2a86e5e6 100644 --- a/book/en/apis/core/DataCache.html +++ b/book/en/apis/core/DataCache.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/DataTable.html b/book/en/apis/core/DataTable.html index 785de1b1..28a78f7d 100644 --- a/book/en/apis/core/DataTable.html +++ b/book/en/apis/core/DataTable.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/DataView.html b/book/en/apis/core/DataView.html index 757d2d5f..42ae439c 100644 --- a/book/en/apis/core/DataView.html +++ b/book/en/apis/core/DataView.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/DragAndDropTitlePlugin.html b/book/en/apis/core/DragAndDropTitlePlugin.html index 55baa29d..1ed3996e 100644 --- a/book/en/apis/core/DragAndDropTitlePlugin.html +++ b/book/en/apis/core/DragAndDropTitlePlugin.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/ElementWrapper.html b/book/en/apis/core/ElementWrapper.html index ed199af3..6aef47db 100644 --- a/book/en/apis/core/ElementWrapper.html +++ b/book/en/apis/core/ElementWrapper.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/EventDispatcher.html b/book/en/apis/core/EventDispatcher.html index 373baea2..246fed55 100644 --- a/book/en/apis/core/EventDispatcher.html +++ b/book/en/apis/core/EventDispatcher.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/Grid.html b/book/en/apis/core/Grid.html index 03f53543..46d11b08 100644 --- a/book/en/apis/core/Grid.html +++ b/book/en/apis/core/Grid.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/HScrollbar.html b/book/en/apis/core/HScrollbar.html index 7f4f95f5..d15c6d72 100644 --- a/book/en/apis/core/HScrollbar.html +++ b/book/en/apis/core/HScrollbar.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/ILayoutGrid.html b/book/en/apis/core/ILayoutGrid.html index 421baed1..7236ac1f 100644 --- a/book/en/apis/core/ILayoutGrid.html +++ b/book/en/apis/core/ILayoutGrid.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/LayoutGrid.html b/book/en/apis/core/LayoutGrid.html index b8c18136..a649df5a 100644 --- a/book/en/apis/core/LayoutGrid.html +++ b/book/en/apis/core/LayoutGrid.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/Scrollbar.html b/book/en/apis/core/Scrollbar.html index fe4cb6ad..93682314 100644 --- a/book/en/apis/core/Scrollbar.html +++ b/book/en/apis/core/Scrollbar.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/SectionSettings.html b/book/en/apis/core/SectionSettings.html index 9ce34186..10456813 100644 --- a/book/en/apis/core/SectionSettings.html +++ b/book/en/apis/core/SectionSettings.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/Segment.html b/book/en/apis/core/Segment.html index 3d501c60..0449e238 100644 --- a/book/en/apis/core/Segment.html +++ b/book/en/apis/core/Segment.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/SegmentCollection.html b/book/en/apis/core/SegmentCollection.html index 3fe17257..03671903 100644 --- a/book/en/apis/core/SegmentCollection.html +++ b/book/en/apis/core/SegmentCollection.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/SortableTitlePlugin.html b/book/en/apis/core/SortableTitlePlugin.html index 537464a0..ad43fa89 100644 --- a/book/en/apis/core/SortableTitlePlugin.html +++ b/book/en/apis/core/SortableTitlePlugin.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/core/VScrollbar.html b/book/en/apis/core/VScrollbar.html index d2ca27e0..3f6d6fc0 100644 --- a/book/en/apis/core/VScrollbar.html +++ b/book/en/apis/core/VScrollbar.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/rt_grid/ColumnDefinition.html b/book/en/apis/rt_grid/ColumnDefinition.html index 30557396..126cd27e 100644 --- a/book/en/apis/rt_grid/ColumnDefinition.html +++ b/book/en/apis/rt_grid/ColumnDefinition.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/rt_grid/Grid.html b/book/en/apis/rt_grid/Grid.html index 4b5a0083..3f860670 100644 --- a/book/en/apis/rt_grid/Grid.html +++ b/book/en/apis/rt_grid/Grid.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/apis/rt_grid/RowDefinition.html b/book/en/apis/rt_grid/RowDefinition.html index 1a19d43a..50bf0db4 100644 --- a/book/en/apis/rt_grid/RowDefinition.html +++ b/book/en/apis/rt_grid/RowDefinition.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Starteddiff --git a/book/en/columns/column-alignment.html b/book/en/columns/column-alignment.html index 42227157..1ca23652 100644 --- a/book/en/columns/column-alignment.html +++ b/book/en/columns/column-alignment.html @@ -23,7 +23,7 @@
Grid Usage Guide
-
Getting Started@@ -290,7 +290,7 @@
Column Alignment
}Example
-+Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/columns/column-freezing.html b/book/en/columns/column-freezing.html index eced70cc..ddac679e 100644 --- a/book/en/columns/column-freezing.html +++ b/book/en/columns/column-freezing.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/columns/column-grouping.html b/book/en/columns/column-grouping.html index d9469178..f728d9a8 100644 --- a/book/en/columns/column-grouping.html +++ b/book/en/columns/column-grouping.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/columns/column-moving.html b/book/en/columns/column-moving.html index b044f286..1557e848 100644 --- a/book/en/columns/column-moving.html +++ b/book/en/columns/column-moving.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Drag and drop
The ability of drag and drop column is enabled by default. But it can be turned off by setting
noColumnDragging
to true. The default value is false.Drag and drop to move a column example (default)
-+Drag and drop to move a
Disabled drag and drop example
-+Using APIs to move a column
See available APIs for more details.
Example
-+Preventing a column from moving
By marking a column to be a
stationary
column, any column on the left and the stationary column will be locked in the position (i.e., columns cannot be moved). A column can still be added to or removed from the stationary section. Once stationary column is removed or unmarked asstationary
, the columns in the section will be free to be moved. See Column Definition for more details of column options.Example
-+Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/columns/column-reordering.html b/book/en/columns/column-reordering.html index 83ab7f3e..83de4f14 100644 --- a/book/en/columns/column-reordering.html +++ b/book/en/columns/column-reordering.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/columns/column-resetting.html b/book/en/columns/column-resetting.html index 31eb454a..e0a5f7a6 100644 --- a/book/en/columns/column-resetting.html +++ b/book/en/columns/column-resetting.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/columns/column-styling.html b/book/en/columns/column-styling.html index 09d3928d..f1aa3207 100644 --- a/book/en/columns/column-styling.html +++ b/book/en/columns/column-styling.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Started@@ -277,7 +277,7 @@
Column Styling
Columns can be styled by using CSS in the
styles
property of the column definition.Example
-+Grid Usage Guide
-+ -
Getting Started@@ -289,7 +289,7 @@
Preserving Grid's size
After column resizing if the total columns' width is less than Grid' size, there will be empty space next to last column. In contrast the horizontal scrollbar will be shown. To prevent Grid from this kind of cases the preserving Grid's size mode must be enabled, please see Column Resizing Extension for configuration document.
Default Grid width with default column width
-+Default Grid width with de
Fixed Grid width with default column width
-+Fixed Grid width with defaul
Fixed Grid width with fixed column width
-+Fixed Grid width with fixed co
Default Grid width with fixed column width
-+Default Grid width with fixe
Fixed column width with proportional column width
-+Fixed column width wi
Pinning right columns
-+Pinning right columns
Pinning both sides
-+Pinning both sides
Delayed initialization (after 5 seconds)
-+Grid Usage Guide
-+ -
Getting Started@@ -288,7 +288,7 @@
Column - Custom Title
grid.config = configObj;Example
-+Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Insert Column
Use the
insertColumn()
methods to insert a column with its configuration.Example
-+Grid Usage Guide
-+ -
Getting Started@@ -279,7 +279,7 @@
Hide/remove Column
Use the
removeColumn()
,removeColumns()
orremoveAllColumns()
methods to remove the specified column(s).Example
-+Grid Usage Guide
-+ -
Getting Started@@ -302,7 +302,7 @@
Clearing data
grid.data = null; // Clear all existing data
Columns and data property example
-+Resetting and updating data in Grid
Rows and data property example
-+Grid Usage Guide
-+ -
Getting Started@@ -296,7 +296,7 @@
Creating and Adding Data
All available APIs can be found here
Example
-+Grid Usage Guide
-+ -
Getting Started@@ -292,7 +292,7 @@
dataComposed event
// other grid's options dataComposed: onDataComposed }; -+dataComposed event
Auto date conversion
When dealing with date-time data it may be hard to handle the various types of incoming data, which can be number, string, ISO date string, seconds or milliseconds. So it is better to enable
-autoDateConversion
in the Grid's configuration and let Grid automatically convert data to JavaScript native Date object. To let Grid know that the column's data is data-time, thedataType: "datatime"
should be specified in the column's options.+Grid Usage Guide
-+ -
Getting Started@@ -291,7 +291,7 @@
Deleting or Removing Data
All available APIs can be found here
Example
-+Grid Usage Guide
-+ -
Getting Started@@ -290,7 +290,7 @@
APIs
grid.api.logDT(); // Rows in original orderExample
-+Grid Usage Guide
-+ -
Getting Started@@ -307,7 +307,7 @@
Updating a row
Example
The following example use object to map between RIC (text) and RowDefinition created from
-insertRow
method.+Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/column-dragging.html b/book/en/extensions/column-dragging.html index bb9d987c..e0cbe283 100644 --- a/book/en/extensions/column-dragging.html +++ b/book/en/extensions/column-dragging.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/row-segmenting.html b/book/en/extensions/row-segmenting.html index 03f5f8cb..93437ac3 100644 --- a/book/en/extensions/row-segmenting.html +++ b/book/en/extensions/row-segmenting.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Row Segmenting
The Row Segmenting Extension provides a way to group row content based on row index. By specifying a row index, the row becomes a group header. Any row below the group header can then be added as a group member. This provides more flexibility in how you define a group, unlike Row Grouping Extension where groups are based on strictly defined criteria.
-+Grouping criteria
Segment Classification (multi-level/nested grouping)
With Row Segmenting Extension, you can specify classfication on individual segment to add nested segments. The criteria can be defined by using
-setSegmentClassification
method with array of fields as its parameter.+Group sorting
-+Row Segmenting Extension features
Predefined color on the color tagsThe extension supports color from the predefined colors. To do this you need to assign predefined class object to the
-predefinedColors
property then specify field name of thecssField
property.+Saving and loading segments
You can follow in below example for implement save/load functionality.
The first example it will be grid that can be change data with click "Save config".
And then you can paste this config on the example 2 and click "Start Grid" and both grids look the same.Example 1: saving segment configuration from grid
-+Example 1: saving segm
Example 2: restoring segments
-+Empty segment filtering
By default, segment header cannot be filtered out. However, Row Filtering Extension has
emptySegmentFiltering
option that allows empty segment to be filtered out. With the option turned on, any segment whose all of its members are not present by filtering will also be hidden. Empty segment will still be visible, if there is no active filter. Collapsing of the segment does not count as having an active filter.
-separatorFiltering
option from Row Filtering Extension also allow separator rows to be filtered as if they were a normal row. Note that the separator rows can be filtered out, while their child rows may ramain visible.+Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Statistics Row
The Statistics Row Extension provides special rows to show various statistics for the grid's content.
-+Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-cell-selection.html b/book/en/extensions/tr-grid-cell-selection.html index 0ea87051..17005173 100644 --- a/book/en/extensions/tr-grid-cell-selection.html +++ b/book/en/extensions/tr-grid-cell-selection.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-checkbox.html b/book/en/extensions/tr-grid-checkbox.html index de994d25..c5708ee6 100644 --- a/book/en/extensions/tr-grid-checkbox.html +++ b/book/en/extensions/tr-grid-checkbox.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-column-fitter.html b/book/en/extensions/tr-grid-column-fitter.html index efff4ea4..300de73a 100644 --- a/book/en/extensions/tr-grid-column-fitter.html +++ b/book/en/extensions/tr-grid-column-fitter.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-column-formatting.html b/book/en/extensions/tr-grid-column-formatting.html index 6660b87c..d27c0009 100644 --- a/book/en/extensions/tr-grid-column-formatting.html +++ b/book/en/extensions/tr-grid-column-formatting.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-column-grouping.html b/book/en/extensions/tr-grid-column-grouping.html index 954ba65c..83b697ba 100644 --- a/book/en/extensions/tr-grid-column-grouping.html +++ b/book/en/extensions/tr-grid-column-grouping.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-column-resizing.html b/book/en/extensions/tr-grid-column-resizing.html index aacc48b8..18297150 100644 --- a/book/en/extensions/tr-grid-column-resizing.html +++ b/book/en/extensions/tr-grid-column-resizing.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-column-selection.html b/book/en/extensions/tr-grid-column-selection.html index 7f632c44..ab637431 100644 --- a/book/en/extensions/tr-grid-column-selection.html +++ b/book/en/extensions/tr-grid-column-selection.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-column-stack.html b/book/en/extensions/tr-grid-column-stack.html index 12499bee..459c821b 100644 --- a/book/en/extensions/tr-grid-column-stack.html +++ b/book/en/extensions/tr-grid-column-stack.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-conditional-coloring.html b/book/en/extensions/tr-grid-conditional-coloring.html index cc88e3ca..37548a72 100644 --- a/book/en/extensions/tr-grid-conditional-coloring.html +++ b/book/en/extensions/tr-grid-conditional-coloring.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-content-wrap.html b/book/en/extensions/tr-grid-content-wrap.html index e0885e95..4530da04 100644 --- a/book/en/extensions/tr-grid-content-wrap.html +++ b/book/en/extensions/tr-grid-content-wrap.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-contextmenu.html b/book/en/extensions/tr-grid-contextmenu.html index 483bdefd..8712736d 100644 --- a/book/en/extensions/tr-grid-contextmenu.html +++ b/book/en/extensions/tr-grid-contextmenu.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Starteddiff --git a/book/en/extensions/tr-grid-filter-input.html b/book/en/extensions/tr-grid-filter-input.html index e4befc29..948127ce 100644 --- a/book/en/extensions/tr-grid-filter-input.html +++ b/book/en/extensions/tr-grid-filter-input.html @@ -23,7 +23,7 @@
Grid Usage Guide
-+ -
Getting Started@@ -396,6 +396,158 @@
Installation and how to imp
Installation examples and details of how to import the extension to a project are available on the Overview page.
Required dependencies
Details of Required dependencies for this extension are available on the Overview page.
+Using filter input for fetching data
+If you want to fetch data from server side based on the value of the filter input, you can achieve this by listening to the event of the filter input element that we provide in the
+ +inputCreated
event. You can follow the example below for guidance.++ ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +++-
+
- HTML +
- JS +
- CSS +
++<efx-grid> +</efx-grid>
+var FilterInput = tr.FilterInputExtension; +var RowFiltering = tr.RowFilteringExtension; +var DataGenerator = DataGenerator; +var fields = ["market", "sentence", "CF_NETCHNG", "CF_LAST"]; +var records = DataGenerator.generateRecords(fields, { numRows: 100, seedd: 0 }); +var filterInputExt = new FilterInput(); +var rowFilteringExt = new RowFiltering(); + +var configObj = { + columns: [{ + field: fields[0], + name: "Market", + filterInput: { + defaultLogic: function() { + // Disable default logic (disable filter to use server side filtering) + return true; + } + } + }, + { + field: fields[1], + name: "Description", + filterInput: { + disabled: true + } + }, + { + field: fields[2], + name: "Net Chng.", + filterInput: { + disabled: true + } + }, + { + field: fields[3], + name: "Last", + filterInput: { + disabled: true + } + } + ], + staticDataRows: records, + extensions: [filterInputExt, rowFilteringExt] +}; + +var grid = document.getElementsByTagName("efx-grid")[0]; +grid.config = configObj; + +filterInputExt.addEventListener("inputCreated", function(e) { + var inputEl = e.input; + inputEl.addEventListener("value-changed", onFilterInputKeyUp); +}); + +var inputVal; + +function onFilterInputKeyUp(e) { + inputVal = e.detail.value; + // Simulate to fetch data from the server + conflationdFetch(); +} + +// ========== Simulate server side in below ========== + +function generateRecords(numRows, seed) { + // This function on server side + var records = DataGenerator.generateRecords(fields, { + numRows: numRows, + seed: seed + }); + + if (inputVal != null) { + console.log(inputVal); + var filterRecord = records.filter(function(record) { + return record[fields[0]].indexOf(inputVal) > -1; + }); + return filterRecord; + } + return records; +} + +// Define your fetch function +function fetch() { + // Your code to make the server request goes here + console.log("Fetching data from the server..."); + // await data from the server + grid.data = generateRecords(1000); // assign data back to grid +} + +// Create a conflation function to prevent excessive data call frequency +function conflation(func, delay) { + let timeoutId; + return function() { + clearTimeout(timeoutId); + timeoutId = setTimeout(func, delay); + }; +} +var conflationdFetch = conflation(fetch, 500);
+efx-grid { + height: 200px; +}
+ +API Reference
diff --git a/book/en/extensions/tr-grid-filter-input.md b/book/en/extensions/tr-grid-filter-input.md index 92e14854..2c2b64f0 100644 --- a/book/en/extensions/tr-grid-filter-input.md +++ b/book/en/extensions/tr-grid-filter-input.md @@ -88,6 +88,122 @@ Installation examples and details of how to import the extension to a project ar Details of Required dependencies for this extension are available on the [Overview](README.md) page. +### Using filter input for fetching data + +If you want to fetch data from server side based on the value of the filter input, you can achieve this by listening to the event of the filter input element that we provide in the `inputCreated` event. You can follow the example below for guidance. + + +```live + ++ +``` + + + API Reference
diff --git a/book/en/extensions/tr-grid-heat-map.html b/book/en/extensions/tr-grid-heat-map.html index d006643c..b9339ec2 100644 --- a/book/en/extensions/tr-grid-heat-map.html +++ b/book/en/extensions/tr-grid-heat-map.html @@ -23,7 +23,7 @@Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Heat Map
The Heat Map Extension provides heat map coloring for column fields, which will be the type set by the heatMap property.
-+Grid Usage Guide
-+ -
Getting Started@@ -285,7 +285,7 @@
In-Cell Editing
- Use
openRowEditor
API to edit all cells in a row.
+Installation and how to imp
Single click for editing
The live demo below demonstrates how to open editor with
-single click
event. In this setting, you do not need todouble click
to open the editor. You can disabledouble click
mode by settingdoubleClick
tofalse
then handle it with your own implementation like the following example.+Populating text and data binding
Note: more information about adding event listener can be found on this page
-+Editor types
Note: each editor, except for simple text input, requires different ELF elements to be loaded. See the list of required dependencies on this page.
-+Row editor
Using the event
beforeRowCommit
to allow a developer verify the user input before an actual commit process occurs. A developer can mutate the user input or decide to cancel the commit process if the verifying process fails.The live demo below demonstrates how to control the row editor with the
-openRowEditor
,closeRowEditor
,toggleRowEditor
APIs andbeforeRowCommit
event.+Custom cell editor
Apart from the default and predefined editors, a custom editor can be easily created by implementing it from the event
editorOpened
. Since the custom editor is not directly wired to the extension, you will need to commit user input throughcommitText
API.The example below show how to create an editor with
-yes
,no
andnone
options. Note that the predefined "dropdown" editor can be used instead of the custom editor shown in this example.++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Custom cell editor
grid.config = configObj;efx-grid { height: 200px; +}
+ +Preventing rows from moving during editing
+By default rows are prevented from moving during editing. This is to avoid confusion of which row is being edited. For instance, if sorting or filtering is active and data have been constantly changed, rows would be moved around a lot. Once editor is opened, grid's view is frozen and rows cannot be moved until the end of editing session.
+ +++ +++++-
+
- HTML +
- JS +
- CSS +
+diff --git a/book/en/extensions/tr-grid-in-cell-editing.md b/book/en/extensions/tr-grid-in-cell-editing.md index 325722e9..fda4eed7 100644 --- a/book/en/extensions/tr-grid-in-cell-editing.md +++ b/book/en/extensions/tr-grid-in-cell-editing.md @@ -404,6 +404,70 @@ The example below show how to create an editor with `yes`, `no` and `none` optio ``` +### Preventing rows from moving during editing + +By default rows are prevented from moving during editing. This is to avoid confusion of which row is being edited. For instance, if sorting or filtering is active and data have been constantly changed, rows would be moved around a lot. Once editor is opened, grid's view is frozen and rows cannot be moved until the end of editing session. + +```live + +<efx-grid id="grid"> +</efx-grid>
+var extension = new InCellEditing(); + +var fields = ["id", "companyName", "market", "CF_LAST", "CF_NETCHNG", "industry"]; +var colNames = ["Id", "Company", "Market", "Last", "Net. Chng", "Industry"]; +var columns = fields.map(function(f, idx) { + return { + name: colNames[idx], + field: f + }; +}); +columns[0].width = 60; +columns[2].width = 150; +columns[3].width = 150; +columns[3].blinking = true; +columns[4].width = 80; + +var configObj = { + sorting: { + initialSort: { + sortOrder: "a", + field: fields[3], + } + }, + columns: columns, + staticDataRows: generateRecords(), + inCellEditing: { + editableTitle: false, + editableContent: true + }, + extensions: [ + extension + ] +}; + +var grid = document.getElementById("grid"); +grid.config = configObj; + +function generateRecords() { + var records = DataGenerator.generateRecords(fields, { numRows: 10 }); + records.forEach(function(record, idx) { + record["id"] = idx; + }); + return records; +} + +setInterval(function() { + grid.data = generateRecords(); +}, 2000);
+efx-grid { + height: 250px; }
+ + +``` + diff --git a/book/en/extensions/tr-grid-pagination.html b/book/en/extensions/tr-grid-pagination.html index 6c539039..a600ae6d 100644 --- a/book/en/extensions/tr-grid-pagination.html +++ b/book/en/extensions/tr-grid-pagination.html @@ -23,7 +23,7 @@ Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Pagination
The Pagination Extension provides behaviors that allow you to split a huge amount of content within your grid into smaller parts. This extension is for client side pagination, where all data is already available at the client side. For server side pagination, see our pagination usage guide.
-+Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Percent Bar
The Percent Bar Extension is an extension that provides formatter for rendering percent bar in column.
-+Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Range Bar
The Range Bar Extension provides graphical bar for last value ranking visualization based on low and high value.
-+Price Graph
The Range Bar Extension provides a powerful solution for integrating the last trade price or value, displayed in relation to the current day's high, low, and Volume Weighted Average Price (VWAP), into a visually comprehensive price graph. This functionality can significantly enhance the capabilities of financial charting applications and tools.
To make the most of the Range Bar Extension, you can simply map the pertinent fields to the range bar options for each individual column. This process enables the effective illustration of price movements and trends, resulting in an easily understandable format that can be seamlessly integrated into their applications. Consequently, users of these applications can gain valuable insights into market behavior, empowering them to make more informed decisions in their trading and investment activities.
-+Price Graph
With Custom Tooltip
If you want to use a customized tooltip for the range bar, you can use it with
-disabled
the rangeBar default tooltip with option and adding a tooltip condition.
For adding condition of tooltip you can importaddConditionTooltip
from the tooltip dependency and use it with passcondition
andrenderer
function, following in the example below.+Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Row Dragging
The Row Dragging Extension allows the user to drag and reorder selected rows.
-+Custom dragbox
Drag and drop content outside grid's area
The Row Dragging Extension can be used together with the
-RowSelectionPlugin
to allow users to drag a selected row and drop it to a target outside of a Grid. Then, adddragEnd
handler to perform content copying of the selected rows as illustrated below:+Grid Usage Guide
-+ -
Getting Started@@ -281,7 +281,7 @@
Row Filtering
Note that this extension does not provide any UI to do filtering. If you want to have UIs for end users to do filtering, you need to include either Row Filtering Extension or Filter Dialog Widget in addition to this extension.
-+Initializing Grid with a column
The first two formats are recommended for most of the use cases as they are serializable and well understood by both Row Filtering Extension and Filter Dialog.
-+Filtering with a search box example
The
-addGridFilter
can recieve any type in the second parameter. The given input will be passed to the third argument in filter function.+Filtering with a search box example
Basic filtering example
-+Filter icon activation modes
-+Grid Usage Guide
-+ -
Getting Started@@ -278,7 +278,7 @@
Grid Usage Guide
Row Grouping
The Row Grouping Extension uses categorization based on column field. Each group will have arrow button for expansion and collapsing of its members.
-+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-