0

I would like to remove values of a column inside my Slickgrid.

In this way I identify the id of column

grid.getColumnIndex('ColumnName');

Then, I would like to loop on grid rows, trying to clear the text in the cells

var myColumnID=grid.getColumnIndex('ColumnName');
var RowsNumber=grid.getDataLength();
for (var j = 1; j < RowsNumber; j++) {
    var objRow = grid.getData().getItem(j);

    // ??
}

How can I point to cell in column "myColumnID" and change its content? If the grid values are stored on multiple pages, does this idea work?

This task must be done on grid object or dataView object? Or both?

Valentino
  • 33
  • 1
  • 6
  • Have you really search for an answer? This was answered multiple time on how to update data and the answer to your question of "is it with the `grid` or `dataView` object", it's simple are you using the DataView or not? If Yes then use the DataView functions if No then use the grid functions then invalidate the row (or all rows) to re-render the UI. I won't go further, just search a bit more and you'll find many stack overflow answers – ghiscoding Jan 11 '21 at 03:21
  • I opened this thread because I couldn't find the answer to my problem about "how to edit/delete the text of a cell?" :-) – Valentino Jan 11 '21 at 15:13
  • search for "slickgrid update" and you will find a few... there's no point in duplicating the same answer – ghiscoding Jan 11 '21 at 18:28
  • Thank you for your help. I have not found any example code for what I have to do. In order not to duplicate the text already written in other posts, could you write the direct link? – Valentino Feb 02 '21 at 10:25
  • [answer 1](https://stackoverflow.com/questions/9772207/data-update-in-slick-grid), [answer 2](https://forums.asp.net/p/1985276/5691555.aspx?Re+why+second+data+is+not+updated+), [answer 3](https://www.codeproject.com/Questions/780678/How-to-bind-json-data-to-slickgrid-with-ajax-load), [answer 4](https://joeriks.wordpress.com/2011/07/03/a-first-look-at-slickgrid-with-read-and-update-in-webmatrix/), seriously there's plenty of SlickGrid CRUD examples, just do a search... – ghiscoding Feb 02 '21 at 13:51

0 Answers0