Skip to content

Commit a9ed80e

Browse files
author
Marin Bratanov
committed
chore(grid): refactor accessing data client side section
1 parent 1e2351e commit a9ed80e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

controls/grid/rows/accessing-cells-and-rows.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,11 @@ var masterTable = grid.get_masterTableView();
446446
var item = masterTable.get_dataItems()[3];//where 3 is the hierarchical index of the item you want
447447
````
448448

449-
* Using **get_cell()** method is the most straightforward approach to achieve that.
449+
Once you have a reference to the grid row data item on the client-side, you can use various methods to get information from it:
450+
451+
### get_cell()
452+
453+
Using the **get_cell()** method is the most straightforward approach to get to the DOM of the grid so you can extract text, or access controls/elements. You need to pass the `UniqueName` of the column whose cell you want.
450454

451455
````JavaScript
452456
function rowClick(sender, args) {
@@ -456,7 +460,9 @@ function rowClick(sender, args) {
456460
}
457461
````
458462

459-
* The next approach enables extracting the raw value directly in its original database form. The required action is to add the Field name in the **ClientDataKeyNames** property of the **MasterTableView** or the corresponding **GridTableView** tag.
463+
### getDataKeyValue()
464+
465+
You can extract the raw value directly in its original database form. The required action is to add the Field name in the **ClientDataKeyNames** property of the **MasterTableView** or the corresponding **GridTableView** tag.
460466

461467
````JavaScript
462468
function gridCreated(sender, args) {
@@ -466,7 +472,9 @@ function gridCreated(sender, args) {
466472
}
467473
````
468474

469-
* The client-side object of **GridTableView** provides **getCellByColumnUniqueName()** method, which is another alternative to get a reference to the cell element.
475+
### getCellByColumnUniqueName()
476+
477+
The client-side object of **GridTableView** provides **getCellByColumnUniqueName()** method, which is another alternative to get a reference to the cell element by passing its `UniqueName`.
470478

471479
````JavaScript
472480
function pageLoad() {

0 commit comments

Comments
 (0)