Hello, @elector!
You can't really give IDs to grid row cells as they are likely dynamically rendered on screen. That's particularly true if the grid has more results than what the screen can show without a scrollbar. If you rely on what's rendered on the page, rows will be missed, and potentially have different DOM rendered rows as the grid is scrolled up and down.
For smaller grids with very few records this could be safe. To ensure a consistent DOM, it is possible to disable dynamic row rendering (buffered rendering) of the
grid's store with
BufferedRenderer="false"
. This will make all grid rows to be rendered at once when the page is loaded.
Then to get a row's DOM based on
this simple grid panel example:
App.GridPanel1.getView().getRow(num)
, from 0 to the number of records (less one, it's a zero-based index array); or from 0 until it returns
null
.
Likewise, it would be possible to get the whole DOM table, representing the view, using CSS/javascript selection if relying in Ext.NET's client side code (Ext JS) isn't desired. Then walking through the rows
<tr>
and cells
<td>
.
Specifying an ID to every grid's cell is not supported as it potentially breaks many other features of the grid. If you need to validate the data, getting the records via
App.GridPanel1.getStore().getAt(index)
should be the way to go. Disabling
BufferedRenderer
could potentially make the cell IDs static, as long as there's nothing else "dynamic" across the page that might increment the global component count.
Hope this helps!