Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

Update Cell Contents with JavaScript

$
0
0

I have another question about this.  How do I look at individual cell values in the grid?

My use case is to click a button that executes a JavaScript function.  The JavaScript function spins through the grid and changes data.  Konstantin showed me how to do this and it works.  So now I want to expand the use case.  Instead of just updating all of the rows in the grid.  I want to look a another column in the grid to determine if I should update the grid. 

Konstantin showed me how to set the datasource value and the grid value.  I have to have 2 loops.  One loop for datasource, and the other loop for HTML to set the dirty flag.  But as I'm spinning through the grid, how do I look at the contents of another cell? 

The command to update a cell in the datasource is this: items[i].set("SpringCost", $('#SpringCostInput').val());   I'm struggling how to evaluate the contents of another column.  I tried items[I].getElementByID("SelectionField"), but that didn't work.

The command to update a cell in the HTML is:  $(rows[i].cells[4]).addClass("k-dirty-cell");  How would I look at the contents of a column called "SelectionField" in this loop?


Viewing all articles
Browse latest Browse all 78072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>