EzGridCheckBox

EzGridCheckBox

new EzGridCheckBox(grdopt, cellIdxopt, canCheckopt, onCheckedopt)

Description:
  • Grid 체크박스 관리 도구

Author:
  • 이승갑 (dltmdrkq2@gmail.com)
  • 정민석 (whitn86@gmail.com)
Example
this.gridChk = new nexacro.EzGridCheckBox();
Parameters:
Name Type Attributes Description
grd nexacro.Grid <optional>

체크박스 기능을 부여할 Grid

cellIdx number <optional>

체크박스를 만들 cell index

canCheck function <optional>

체크 가능 여부를 확인할 때 사용할 함수, 미입력시 모두 체크 가능한것으로 판단

Properties
Name Type Description
ds nexacro.Dataset

Grid에 바인딩 된 Dataset

row number

체크를 시도한 row

return boolean

체크 가능 여부

onChecked function <optional>

체크 후처리 함수

onCheck.data Object

체크 후처리 정보 이벤트 객체

Properties
Name Type Description
dataset Object

ListView에 바인딩 된 Dataset

row number

체크를 시도한 row, -1일 경우 head

value boolean

변경된 값

Extends

Members

bodycell :number

Description:
  • 체크박스 가 구성된 body cell index

Inherited From:

체크박스 가 구성된 body cell index

Type:
  • number

(readonly) bodycellEditType :string

Description:
  • 체크박스 가 구성된 cell 의 원본 edittype

Inherited From:

체크박스 가 구성된 cell 의 원본 edittype

Type:
  • string

(readonly) bodycellId :string

Description:
  • 체크박스 가 구성된 cell 의 id

Inherited From:

체크박스 가 구성된 cell 의 id

Type:
  • string

comp :string

Description:
  • EzListCheckBox가 관리하고 있는 Component

Inherited From:

EzListCheckBox가 관리하고 있는 Component

Type:
  • string

(readonly) dataset :nexacro.Dataset

Description:
  • EzListCheckBox가 관리하고 있는 Component에 바인딩 되어있는 dataset

Inherited From:

EzListCheckBox가 관리하고 있는 Component에 바인딩 되어있는 dataset

Type:
  • nexacro.Dataset

grid :nexacro.Grid

Description:
  • EzGridCheckBox에 바인딩된 Grid

EzGridCheckBox에 바인딩된 Grid

Type:
  • nexacro.Grid

(readonly) hasCheckedRow :boolean

Description:
  • 체크된 row 존재 여부

Inherited From:

체크된 row 존재 여부

Type:
  • boolean
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
var hasChk = gridChk.hasCheckedRow;

headcell :number

Description:
  • 체크박스 가 구성된 head cell index

Inherited From:

체크박스 가 구성된 head cell index

Type:
  • number

(readonly) headcellId :string

Description:
  • 체크박스 가 구성된 head cell 의 id

Inherited From:

체크박스 가 구성된 head cell 의 id

Type:
  • string

Methods

checkAll(bChkopt)

Description:
  • 모든 row를 체크/체크해제한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
gridChk.checkAll();
Parameters:
Name Type Attributes Default Description
bChk boolean <optional>
true

체크여부

checkRow(row, bChk)

Description:
  • 특정 row를 체크/체크해제한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
gridChk.checkRow(this.Dataset00.rowposition);
Parameters:
Name Type Description
row number

체크/체크해제 할 row

bChk boolean

체크여부

countCheckedRows() → {number}

Description:
  • 체크된 row의 수를 확인한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
var cnt = gridChk.countCheckedRows();
Returns:

체크된 row 수

Type
number

createDataset(strDatasetId, arrColList) → {nexacro.Dataset}

Description:
  • 체크된 데이터만 가진 새로운 데이터셋을 만든다.

Inherited From:
Example
gridChk.createDataset(this.Dataset00);
Parameters:
Name Type Description
strDatasetId string

새로 생성될 DataSet 의 ID

arrColList Array.<string>

새로 생성될 DataSet 의 Column 구조와 데이터 생성방법 nexacro.Dataset.createDataset 의 arrColList양식을 따름

Returns:

설정한 조건을 만족하는 Row 로 이루어진 DataSet, 실패시 Null반환

Type
nexacro.Dataset

deleteCheckedRows()

Description:
  • 체크된 모든 row들을 삭제한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
gridChk.deleteCheckedRows();

destroy()

Description:
  • EzListCheckBox의 정보들을 삭제 EzListCheckBox를 지우기 전 반드시 호출하도록 합니다.

Inherited From:
Example
this.gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
this.gridChk.destroy();
this.gridChk = null;

eachCheckedRows(fn)

Description:
  • 체크된 모든 row를 대상으로 콜백함수를 실행한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
gridChk.eachCheckedRows(function(ds, row){
  ds.setColumn(row,"LVL",0);
});
Parameters:
Name Type Description
fn function

콜백함수

Properties
Name Type Description
ds nexacro.Dataset

대상 Grid에 바인딩 되어있는 Dataset

row number

체크되어있는 row

getCheckedRows() → {Array.<number>}

Description:
  • 체크된 row들을 배열 Array로 가져온다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
var arrChecked = gridChk.getCheckedRows();
Returns:

체크된 row 리스트

Type
Array.<number>

isChecked(row)

Description:
  • 특정 row가 체크된 상태인지 확인한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox(this.Grid00,0);
var isChk = gridChk.isChecked(this.Dataset00.rowposition);
Parameters:
Name Type Description
row number

체크여부를 확인 할 row

Returns:

체크 여부

set_bodycell(cellIdx)

Description:
  • 체크박스를 설정할 bodycell을 세팅한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox();
gridChk.set_bodycell(0);
Parameters:
Name Type Description
cellIdx number

체크박스를 만들 cellIdx

set_comp(comp)

Description:
  • EzListCheckBox 객체에 Component를 등록한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox();
gridChk.set_comp(this.Grid00);
Parameters:
Name Type Description
comp nexacro.Component

등록할 compoenent 객체

set_grid(grd)

Description:
  • EzGridCheckBox 객체에 Grid를 등록한다.

Example
var gridChk = new nexacro.EzGridCheckBox();
gridChk.set_grid(this.Grid00);
Parameters:
Name Type Description
grd nexacro.Grid

등록할 Grid 객체

set_headcell(cellIdx, isBodyCellopt)

Description:
  • 체크박스를 설정할 headCell을 세팅한다.

Inherited From:
Example
var gridChk = new nexacro.,EzListCheckBox();
gridChk.set_bodycell(0);
gridChk.set_headcell(1);
Parameters:
Name Type Attributes Default Description
cellIdx number

체크박스를 만들 cellIdx

isBodyCell boolean <optional>
false

cellIdx가 bodyCell의 index인지 여부