getDataStateCount

public int getDataStateCount(string strState);

해당 상태에 해당하는 건수를 조회하여 리턴한다.

  • 파라미터

string strState 상태

  • 리턴값

건수

  • 상세설명
  • 예제
mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
if (mObjDataGrid.getDataStateCount("Added") > 0)
{
	alert("추가된 데이터를 저장하신 후 추가하여 주십시요.");
	return;
}

getDataValueIndex

public object getDataValueIndex(int intRowIndex, string strColumnId);

index 값을 이용하여 해당컬럼의 값을 리턴한다.

  • 파라미터

int intRowIndex 인덱스

string strColumnId 컬럼ID

  • 리턴값

컬럼값

  • 상세설명
  • 예제
mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
var strName = mObjDataGrid.getDataValueIndex(0, "userName");

setDataValueIndex

public void setDataValueIndex(int intRowIndex, string strColumnId, object objValue)

index 값을 이용하여 해당컬럼의 값을 수정한다.

  • 파라미터

int intRowIndex 현재인덱스

string strColumnId 컬럼ID

object objValue 값

  • 리턴값
  • 상세설명
  • 예제

mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
mObjDataGrid.setDataValueIndex( "userName", "홍길동");

getDataValueKey

public object getDataValueKey(int intRowKeyNo, string strColumnId);

키값을 이용하여 해당컬럼의 값을 리턴한다.

  • 파라미터

int intRowKeyNo 키값

string strColumnId 컬럼ID

  • 리턴값

컬럼값

  • 상세설명
  • 예제
mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
var strName = mObjDataGrid.getDataValueKey(1, "userName");

setDataValueKey

public void setDataValueKey(string strColumnId, object objValue)

키값을 이용하여 해당컬럼의 값을 수정한다.

  • 파라미터

string strColumnId 컬럼ID

object objValue 값

  • 리턴값
  • 상세설명
  • 예제

mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
mObjDataGrid.setDataValueKey(1, "userName", "홍길동");

setStringData

public void setStringData(string strData);

AJAX로 부터 들어온 외부 데이터(JSON)를 그리드에 로드한다.

  • 파라미터

string strData JSON문자열

  • 리턴값
  • 상세설명
  • 예제

$.ajax({type: "POST", url:"aaaa.do", data: {},
success: function(objResponse, strStatus, xhr)
{
if(strStatus == "success")
{
mObjDataGrid.setStringData(JSON.stringify(objResponse.data));
}
},
error: function(jqXHR, textStatus, errorThrown)
{
alert("에러로 인하여 데이터를 로딩할수 없습니다."+ errorThrown);
}
});

setData

public void setData(ScriptObject objData);

AJAX로 부터 들어온 외부 데이터(JSON)를 그리드에 로드한다.

  • 파라미터

ScriptObject objData JSON객체

  • 리턴값
  • 상세설명
  • 예제

$.ajax({type: "POST", url:"aaaa.do", data: {},
	success: function(objResponse, strStatus, xhr)
	{
		if(strStatus == "success")
		{
			mObjDataGrid.setData(objResponse.data);
		}
	},
	error: function(jqXHR, textStatus, errorThrown)
	{				
		alert("에러로 인하여 데이터를 로딩할수 없습니다."+ errorThrown);
	}
});	

loadData

public void loadData();

서버로 부터 데이터 수신하여 그리드데이터를 가져온다.(WCF/Restful 전용)

  • 파라미터
  • 리턴값
  • 상세설명
  • 예제
mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
mObjDataGrid.loadData();

getRowBackGroundColorFilter

public string getRowBackGroundColorFilter();

Row의 백그라운드 처리를 할 JavaScript function명을 설정/리턴한다.

  • 파라미터
  • 리턴값

function명

  • 상세설명
  • 예제
mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
var strJSName = mObjDataGrid.getRowBackGroundColorFilter();

setRowBackGroundColorFilter

public void setRowBackGroundColorFilter(string strRowBackGroundColorFilter);

Row의 백그라운드 처리를 할 JavaScript function명을 설정/리턴한다.

  • 파라미터

string strRowBackgroundColor 백그라운드 색상

  • 리턴값
  • 상세설명
  • 예제
mObjDataGrid = document.getElementById("slDataGrid").Content.EntryPoint;
mObjDataGrid.setRowBackgroundColor("#FFEBF4FC");
mObjDataGrid.setRowBackGroundColorFilter("RowBackGroundColorFilter");

function RowBackGroundColorFilter(strColumnId, strValue) 
{
	var strRowBackGroundColor;
	if (strColumnId == 'childCnt' && strValue > 0) 
	{
		strRowBackGroundColor = "yellow";
	}
	return strRowBackGroundColor;
}

Sekä verenluovuttajien että potilaiden veriryhmäjakauma on sama, joten kaikkien veriryhmien luovuttajia tarvitaan. Olin kuitenkin yhteydessä sivuston pitäjiin, mutta he halusivat pitää kiinni nimestään. Omaapteekki.com sinänsä on ihan hyvä, että maailma ei ole vielä valmis, ja tekemistä riittää.