i think my question is pretty simple but i still didn't find any answer that fits me, neither here nor out there.. so i'd be really happy if someone could help me out, it doesn't matter if it's by providing useful links or whatever...
what i'm trying to achieve: i've got an Ignite UI Grid (igGrid), where i'd like to remove a row using javascript. it doesn't even matter which one. simple, right?
what i've tried so far:
- $(row).remove(); -> in this case every single row is being removed
- $(row).remove(1); -> JavaScript runtime error: Object doesn't support property or method 'replace'
- get_rows(): not supported by javascript, it would work in c# though..
- removeat-method: not supported by javascript, it would work in c# though..
- igGridSelection: selected stuff that i want to keep will be removed, too
and now the code snippet:
$sender = $(this).attr('id');
$varTablName = gridMap.getVarTable($sender);
var rowCount = $("#" + $varTablName).igGrid("widget").igGrid('rows').length;
$("#" + $varTablName).igGrid("widget").igGrid('rows').each(function (index) {
var row = $("#" + $varTablName).igGrid("widget").igGrid("rowAt", index);
if (rowCount > 1) {
$(row).remove(); //the not quite working part
}
it's doable, right? there's no need to go all the way and write it in c# and call it with js, right..? RIGHT??^^