Skip to content

Noodle DeleteLine() Method

Dan Kranz edited this page Sep 20, 2021 · 3 revisions

Removes the records (rows) represented by a data view page, line combination.

The data view must contain at least one columnar field.

The rows are removed from the user's view and marked for deletion. The actual deletion takes place when the database is saved.

Syntax

DeleteLine(page, line)

Parameter Values

Parameter Description
page Page number in data view
line Line number in page

Example

var items = [
  ["1","Vegetable","Tree","1"],
  ["2","Animal","Bird","1"],
  ["3","Mineral","Diamond","1"],
  ["4","Vegetable","Flower","1"],
  ["5","Vegetable","Grass","1"],
  ["6","Animal","Cat","1"],
  ["7","Animal","Dog","1"],
  ["8","Mineral","Ruby","1"],
  ["9","Mineral","Quartz","1"]
];
var db1 = new Noodle(items, ["Seq","Category","Item","Count"]);

// Create a columnar view of categories
db1.InitializeView();
db1.EnterColumnar(2);
db1.GenerateView();

// Delete all rows of the 2nd category; in this case all "Mineral" rows.
db1.DeleteLine(0,2);
Clone this wiki locally