Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script>
	var RightTechPath="https://support.qcell.kr/";
</script>
<script  type="text/javascript" src="https://support.qcell.kr/QCELL/qcell.js"></script>
<link href="https://support.qcell.kr/QCELL/css/styles.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="https://support.qcell.kr/QCELL/theme/fall/css/fall.css">

	<p class="bg-warning text-white">'change'</p>
			<div id="sheetarea1" style="width: 100%; height: 110px;"></div>
			<br>
			<p class="bg-warning text-white">'valuechanged' </p>
			<div id="sheetarea2" style="width: 100%; height: 110px;"></div>
			<br>
			<p class="bg-warning text-white">'datachanged' </p>
			<input type="button" id="load" value="load data" onClick="requestData();" style="background-color: #3796e4;border: 1px solid #3796e4;border-radius: 2px;height: 26px;color: #fff;font-size: 12px;padding: 0 15px; cursor: pointer;">
			<div id="sheetarea3" style="width: 100%; height: 110px;"></div>
			<br>
			<p class="bg-warning text-white">'rowdatechanged' </p>
			<input type="button" id="load" value="setRowData" onClick="setRowData();" style="background-color: #3796e4;border: 1px solid #3796e4;border-radius: 2px;height: 26px;color: #fff;font-size: 12px;padding: 0 15px; cursor: pointer;">
			<div id="sheetarea4" style="width: 100%; height: 110px;"></div>
              
            
!

CSS

              
                
              
            
!

JS

              
                
	
	var sampleData1 = [{ "name": "Hello", "message": "큐셀!","useYn":"Y", "No" : 1, "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "useYn":"Y", "No" : 2, "etc": "가장 간단한 큐셀 그리드입니다." }
					,{ "name": "Hello", "message": "큐셀!","useYn":"N", "No" : 3,  "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "useYn":"N", "No" : 4, "etc": "가장 간단한 큐셀 그리드입니다." }];

	var sampleData2 = [{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." }
					,{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." }];
					
	var sampleData3 = [{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." }
					,{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." }];
					
	var sampleData4 = [{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." }
					,{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Hello", "message": "큐셀!", "etc": "가장 간단한 큐셀 그리드입니다." }];
										
	var combo_data = [{'label': 'Y', 'value': 'Y'}, {'label': 'N', 'value': 'N'} ];		 
	
	var test = [{ "name": "Test1", "message": "큐셀 테스트1", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Test2", "message": "큐셀 테스트2", "etc": "가장 간단한 큐셀 그리드입니다." }
					,{ "name": "Test3", "message": "큐셀 테스트2", "etc": "가장 간단한 큐셀 그리드입니다." },{ "name": "Test4", "message": "큐셀 테스트4", "etc": "가장 간단한 큐셀 그리드입니다." }];
					
    $(document).ready(function () {
        var qcellProperty1 = {
            id: 'qcell1',
            parentid: 'sheetarea1',
            data: { 'input': sampleData1 },
			rowheight : {header: 20, data: 20},
			selectmode : 'row',
            columns: [{ key: 'name', title: ['컬럼1'], width: "20%", type : 'input'}
                , { key: 'message', title: ['컬럼2'], width: "20%", type : 'textarea'}
				, { key: 'useYn', title: ['컬럼3'],width: '10%', type:'selectmenu', options: {'input': combo_data}}
                , { key: 'No', title: ['컬럼4'], width: "10%", type : 'number' }
				, { key: 'etc', title: ['컬럼5'], width: "40%", type : 'input' }]
        }
        QCELL.create(qcellProperty1);
        qcell1 = QCELL.getInstance("qcell1");
		qcell1.bind('change',change);
		
		
		 var qcellProperty2 = {
            id: 'qcell2',
            parentid: 'sheetarea2',
            data: { 'input': sampleData2 },
			rowheight : {header: 20, data: 20},			
			selectmode : 'rows',
            columns: [{ key: 'name', title: ['컬럼1'], width: "20%", type : 'input'}
                , { key: 'message', title: ['컬럼2'], width: "30%", type : 'textarea'}
                , { key: 'etc', title: ['컬럼3'], width: "50%", type : 'input' }]
        }
        QCELL.create(qcellProperty2);
        qcell2 = QCELL.getInstance("qcell2");
		qcell2.bind('valuechanged',valuechanged);		
		
		
		var qcellProperty3 = {
            id: 'qcell3',
            parentid: 'sheetarea3',
            data: { 'input': sampleData3 },
			rowheight : {header: 20, data: 20},			
			selectmode : 'cell',
            columns: [{ key: 'name', title: ['컬럼1'], width: "20%", type : 'input'}
                , { key: 'message', title: ['컬럼2'], width: "30%", type : 'textarea'}
                , { key: 'etc', title: ['컬럼3'], width: "50%", type : 'input' }]
        }
        QCELL.create(qcellProperty3);
        qcell3 = QCELL.getInstance("qcell3");
		qcell3.bind('datachanged',datachanged);
		
		
		var qcellProperty4 = {
            id: 'qcell4',
            parentid: 'sheetarea4',
            data: { 'input': sampleData4 },
			rowheight : {header: 20, data: 20},
			selectmode : 'cells',
            columns: [{ key: 'name', title: ['컬럼1'], width: "20%", type : 'input'}
                , { key: 'message', title: ['컬럼2'], width: "30%", type : 'textarea'}
                , { key: 'etc', title: ['컬럼3'], width: "50%", type : 'input' }]
        }
        QCELL.create(qcellProperty4);
        qcell4 = QCELL.getInstance("qcell4");
		qcell4.bind('rowdatachanged',rowdatachanged);		
		
		
    });
	
	function change() {
			alert("입력 폼인 셀의 값이 변경되었을 때");
         }
	function valuechanged() {
			alert("값이 변경된 후 포커스를 빠져 나갈 때");
         }
	function datachanged() {
			alert("setData()로 그리드의 데이터가 새로운 것으로 변경되었을 때");
         }
	function rowdatachanged() {	
			alert("setRowData()로 그리드의 특정 로우의 데이터가 변경되었을 때");
         }	 
	 
	//데이터 갱신하기
	function setData(){
		qcell3.setData(test);    			
	}
	
	//데이터 갱신하기
	function setRowData(){
		qcell4.setRowData(1,{"name" : "변경된 로우 데이터1", "message" : "변경된 로우 데이터2", "etc" : "변경된 로우 데이터3"});
	}


              
            
!
999px

Console