You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/grid/rows/accessing-cells-and-rows.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -446,7 +446,11 @@ var masterTable = grid.get_masterTableView();
446
446
var item =masterTable.get_dataItems()[3];//where 3 is the hierarchical index of the item you want
447
447
````
448
448
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.
450
454
451
455
````JavaScript
452
456
functionrowClick(sender, args) {
@@ -456,7 +460,9 @@ function rowClick(sender, args) {
456
460
}
457
461
````
458
462
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.
460
466
461
467
````JavaScript
462
468
functiongridCreated(sender, args) {
@@ -466,7 +472,9 @@ function gridCreated(sender, args) {
466
472
}
467
473
````
468
474
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`.
0 commit comments