Skip to content

Noodle CopyLine() Method

Dan Kranz edited this page Mar 17, 2021 · 2 revisions

Copy a line within the columnar portion of a data view page.

Syntax

CopyLine(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 new data view, Category values
db1.InitializeView();
db1.EnterColumnar(2);
db1.GenerateView();

// Each line represents all the rows with that Category value.
// The three “Animal” rows are copied (because they are first in the sort order)
var page = 1;
var line = 1;
db1.CopyLine(page, line);
Clone this wiki locally