• 고객센터
  • 교육
  • 매뉴얼
  • 데모
  • 제품소개
조회 수 : 1785
2010.07.27 (14:26:10)
컬럼 매핑이 잘못되어 있거나 Mgrid의 dataid에 DataSet이 잘못 매핑되었을 수 있습니다.

다시 한번 확인해보시고, 보내주신 화면소스로는 파악하기 어렵습니다.
IE창에서 소스보기로 보내주시기 바랍니다.

>게시판을 이용해 주셔서 감사합니다.
>다음양식에 맞게 입력해주세요.
>
>* 고객시스템명 :
>* 문의할 Component명 및 버전 :  
>* DataSet 버전 : 1,2,1,71 - MxDataSet
>* Tr 버전 :
>* 문의 유형(질문/요청/참조) : Mgrid 사용 문제
>* 내용 :
> 데이터 셋에 Mgrid를 연결후 데이터셋의 CountRow를 하면 데이터가 조회 됀 갯수를 뿌려주는데
> Mgrid에는 데이터가 올라 오지 않고 헤더만보여 줍니다. 클래스 명도 맞게 기술 한거 갖고
> 캡 파일 버젼 도 확인 하고 했는데 문제가 없는듯 한대 ... 왜 않돼는지요 ㅠㅠ
>
>하단에 현재 사용 하고 있는 MXGrid ClassID 와 MXMgrid ClassID
>Mgrid View 하는 부분, 그리고 공통 스크립트로 Mgrid 를 초기화 해서
>데이터 셋과 연결( agrid.DataID = dataset.id ) 하는 부분을 첨부 했으니
>참조 하여 주시기 바랍니다.
>
>[ class ID ]
> 데이터셋 {2506B38B-0FF7-4249-BA3E-8BC1DC399FBB}
> Mgrid     {8B6E903C-6297-44FB-B6C5-4F9D7FCA2A08}
>
>[ View  - jsp 파일]
>String GH_Line_1 = "top="0"  bottom="20" ";
>String GH_Line_2 = "top="20" bottom="40" ";
>String GH_Line_3 = "top="0" bottom="40" ";
>
>String GV_Line_1 = "top="0"  bottom="20" ";
>String GV_Line_2 = "top="20" bottom="40" ";
>String GV_Line_3 = "top="0" bottom="40" ";
>
>int G_Pos = 0;
>int G_Idx = 0;
>
><object id=gridMGRID classid="clsid:8B6E903C-6297-44FB-B6C5-4F9D7FCA2A08" width=100% height=100%>
><Param Name="ColumnInfo"        value='
><COLUMNINFO>
>      <COLUMN id="id_명칭" refcolid="명칭" index="<%=++G_Idx%>">
>             <TREE type="2" levelcolumn="레벨" expand="false"/>                        
>             <HEADER <%=GH_Line_3%> left="<%=G_Pos%>" right="<%=G_Pos+260%>" text="명칭"/>
>             <VIEW   <%=GV_Line_3%> left="<%=G_Pos%>" right="<%=G_Pos+260%>" align="leftcenter"/>
>             <CHILD type="edit" ime="0"/>
>     </COLUMN>
>     <COLUMN id="id_규격" refcolid="규격" index="<%=++G_Idx%>">
>             <HEADER <%=GH_Line_3%> left="<%=G_Pos+260%>" right="<%=G_Pos+330%>" text="규격"/>
>        <VIEW   <%=GV_Line_3%> left="<%=G_Pos+260%>" right="<%=G_Pos+330%>"/>
>        <CHILD type="edit" ime="0"/>
>      </COLUMN>
>      <COLUMN id="id_단위" refcolid="단위" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_3%> left="<%=G_Pos+330%>" right="<%=G_Pos+400%>" text="단위"/>
>        <VIEW   <%=GV_Line_3%> left="<%=G_Pos+330%>" right="<%=G_Pos+400%>" align="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>       </COLUMN>
>       <COLUMN id="id_수량" refcolid="수량" index="<%=++G_Idx%>">
>                 <HEADER <%=GH_Line_3%> left="<%=G_Pos+400%>" right="<%=G_Pos+470%>" text="수량"/>
>        <VIEW   <%=GV_Line_3%> left="<%=G_Pos+400%>" right="<%=G_Pos+470%>" align="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>        </COLUMN>
>       <COLUMN id="id_총합계" view="false">
>        <HEADER <%=GH_Line_1%> left="<%=G_Pos+470%>" right="<%=G_Pos+610%>" text="합계"/>
>        </COLUMN>
>        <COLUMN id="id_단가합계" refcolid="단가합계" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+470%>" right="<%=G_Pos+540%>" text="단가"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+470%>" right="<%=G_Pos+540%>"/>
>        <CHILD type="edit" ime="0"/>
>        </COLUMN>
>        <COLUMN id="id_합계" refcolid="합계" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+540%>" right="<%=G_Pos+610%>" text="금액"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+540%>" right="<%=G_Pos+610%>" align="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>         </COLUMN>
>         <COLUMN id="id_재료비합계" view="false">
>        <HEADER <%=GH_Line_1%> left="<%=G_Pos+610%>" right="<%=G_Pos+750%>" text="재료비"/>
>         </COLUMN>
>        <COLUMN id="id_재료비단가" refcolid="재료비단가" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+610%>" right="<%=G_Pos+680%>" text="단가"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+610%>" right="<%=G_Pos+680%>" align="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>        </COLUMN>
>        <COLUMN id="id_재료비" refcolid="재료비" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+680%>" right="<%=G_Pos+750%>" text="금액"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+680%>" right="<%=G_Pos+750%>"/>
>        <CHILD type="edit" ime="0"/>
>        </COLUMN>
>       <COLUMN id="id_노무비합계" view="false">
>        <HEADER <%=GH_Line_1%> left="<%=G_Pos+750%>" right="<%=G_Pos+890%>" text="노무비"/>
>       </COLUMN>
>        <COLUMN id="id_노무비단가" refcolid="노무비단가" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+750%>" right="<%=G_Pos+820%>" text="단가"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+750%>" right="<%=G_Pos+820%>" align="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>        </COLUMN>
>        <COLUMN id="id_노무비" refcolid="노무비" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+820%>" right="<%=G_Pos+890%>" text="금액"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+820%>" right="<%=G_Pos+890%>" align="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>         </COLUMN>
>         <COLUMN id="id_경비합계" view="false">
>        <HEADER <%=GH_Line_1%> left="<%=G_Pos+890%>" right="<%=G_Pos+1030%>" text="경비"/>
>         </COLUMN>
>         <COLUMN id="id_경비단가" refcolid="경비단가" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+890%>" right="<%=G_Pos+960%>" text="단가"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+890%>" right="<%=G_Pos+960%>"/>
>        <CHILD type="edit" ime="0"/>
>          </COLUMN>
>          <COLUMN id="id_경비" refcolid="경비" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_2%> left="<%=G_Pos+960%>" right="<%=G_Pos+1030%>" text="금액"/>
>        <VIEW   <%=GV_Line_2%> left="<%=G_Pos+960%>" right="<%=G_Pos+1030%>" lign="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>          </COLUMN>
>          <COLUMN id="id_비고" refcolid="비고" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_3%> left="<%=G_Pos+1030%>" right="<%=G_Pos+1290%>" text="비고"/>
>        <VIEW   <%=GV_Line_3%> left="<%=G_Pos+1030%>" right="<%=G_Pos+1290%>"align="leftcenter"/>
>        <CHILD type="edit" ime="0"/>
>           </COLUMN>
>           <COLUMN id="id_제요율적용여부" refcolid="제요율적용여부" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_3%> left="<%=G_Pos+1290%>" right="<%=G_Pos+1360%>" text="제요율적용"/>
>        <VIEW   <%=GV_Line_3%> left="<%=G_Pos+1290%>" right="<%=G_Pos+1360%>"/>
>        <CHILD type="edit" ime="0"/>
>           </COLUMN>
>           <COLUMN id="id_순번" refcolid="순번" index="<%=++G_Idx%>">
>        <HEADER <%=GH_Line_3%> left="<%=G_Pos+1360%>" right="<%=G_Pos+1430%>" text="순번"/>
>        <VIEW   <%=GV_Line_3%> left="<%=G_Pos+1360%>" right="<%=G_Pos+1430%>"/>
>        <CHILD type="edit" ime="0"/>
>          </COLUMN>                                                        
></COLUMNINFO>
>'>
></object>
>
>[ 공통 스크립트 ]
>// Grid 공통 초기화
>function G_GridInitM(grid)
>{
>        if (grid == null)
>        {
>                C_msgOk("Grid 공통 초기화 에러 : " + G_MSG_GRID_NULL, "에러");
>                return false;
>        }
>        
>        try
>        {
>//                 !!Grid 공통 초기화 추가!!
>                grid.DragDrop = 0;
>                grid.Draw = true;
>                grid.Enable = true;
>                grid.EnableDblClkAtNotEditable  = false;
>                grid.FixHScroll = false;
>                grid.FixVScroll = false;
>                grid.FocusRect = false;
>                grid.IME = 0;
>                grid.Resize  = 1;
>                grid.Sort = true;
>                grid.ViewHeader = true;
>        }
>        catch (e)
>        {
>                C_msgOk("Grid 공통 초기화 설정 에러 : " + e.message, "에러");
>                return false;
>        }
>        
>        return true;
>}
>
>// DataSet 등록
>function G_addDataSetM(aDataset, aTrans, aGrid, aServiceURL, aDataSetTitle)
>{
>        if (aDataset == null)
>        {
>                C_msgOk("DataSet 등록 에러 : " + G_MSG_DATASET_NULL, "에러");
>                return false;
>        }
>        
>        try
>        {
>                var objDataSetInfo = new G_DataSetInfoM(aDataset, aTrans, aGrid, aServiceURL, aDataSetTitle);
>                
>                if (G_arrDataSets == null) G_arrDataSets = new Array();
>                
>                G_arrDataSets.push(objDataSetInfo);
>        }
>        catch (e)
>        {
>                C_msgOk("DataSet 등록 에러 : " + e.message, "에러");
>                return false;
>        }
>        
>        try
>        {
>                G_DataSetInit(aDataset);
>                // DataSet 관련 이벤트
>                aDataset.attachEvent ("OnRowInserted", new Function("row", "G_OnRowInserted(" + aDataset.id + ", row);"));
>                aDataset.attachEvent ("OnRowDeleted", new Function("row", "G_OnRowDeleted(" + aDataset.id + ", row);"));
>                aDataset.attachEvent ("OnDataError", new Function("row", "colid", "G_OnDataError(" + aDataset.id + ", row, colid);"));
>                aDataset.attachEvent ("CanRowPosChange", new Function("row", "return G_CanRowPosChange(" + aDataset.id + ", row);"));
>                aDataset.attachEvent ("OnRowPosChanged", new Function("row", "G_OnRowPosChanged(" + aDataset.id + ", row);"));
>                aDataset.attachEvent ("OnColumnChanged", new Function("row", "colid", "G_OnColumnChanged(" + aDataset.id + ", row, colid);"));
>                aDataset.attachEvent ("OnLoadStarted", new Function("G_OnLoadStarted(" + aDataset.id + ");"));
>                aDataset.attachEvent ("OnLoadCompleted", new Function("rowcnt", "G_OnLoadCompleted(" + aDataset.id + ", rowcnt);"));
>                aDataset.attachEvent ("OnLoadError", new Function("G_OnLoadError(" + aDataset.id + ");"));
>                aDataset.attachEvent ("OnLoadProcess", new Function("rowcnt", "G_OnLoadProcess(" + aDataset.id + ", rowcnt);"));
>                aDataset.attachEvent ("OnFilter", new Function("row", "return G_OnFilter(" + aDataset.id + ", row);"));
>                aDataset.attachEvent ("OnLayoutChanged", new Function("colcnt", "G_OnLayoutChanged(" + aDataset.id + ", colcnt);"));
>                aDataset.attachEvent ("OnRowsetChanged", new Function("G_OnRowsetChanged(" + aDataset.id + ");"));
>        }
>        catch (e)
>        {
>                C_msgOk("DataSet 초기화 에러 : " + e.message, "에러");
>                return false;
>        }
>        
>        try
>        {
>                if (aTrans != null)
>                {
>                        G_TransInit(aTrans);
>                        
>                        // Transaction 관련 이벤트
>                        aTrans.attachEvent ("OnSuccess", new Function("G_OnSuccess(" + aDataset.id + ", " + aTrans.id + ");"));
>                        aTrans.attachEvent ("OnFail", new Function("G_OnFail(" + aDataset.id + ", " + aTrans.id + ");"));
>                }
>        }
>        catch (e)
>        {
>                C_msgOk("Transaction 초기화 에러 : " + e.message, "에러");
>                return false;
>        }
>        
>        try
>        {
>                if (aGrid != null)
>                {
>                        aGrid.DataID = aDataset.id;
>                                
>                        G_GridInitM(aGrid);
>                        
>                        // Grid 관련 이벤트
>                        if (aGrid.ColumnInfo != null)
>                        {
>                                aGrid.attachEvent ("OnChar", new Function("G_OnCharM(" + aDataset.id + ", " + aGrid.id + ");"));
>                                aGrid.attachEvent ("OnCloseUp", new Function("colid", "index","G_OnCloseUpM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnCollapsed", new Function("index", "G_OnCollapsedM(" + aDataset.id + ", " + aGrid.id + ", index);"));
>                                aGrid.attachEvent ("OnCollapsing", new Function("index", "return G_OnCollapsingM(" + aDataset.id + ", " + aGrid.id + ", index);"));
>                                aGrid.attachEvent ("OnCopy", new Function("CellSelected", "BlockSelected", "G_OnCopyM(" + aDataset.id + ", " + aGrid.id + ", CellSelected, BlockSelected);"));
>                                aGrid.attachEvent ("OnDrag", new Function("colid", "index", "return G_OnDragM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnDragging", new Function("colid", "index", "return G_OnDraggingM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnDrop", new Function("colid", "index", "data", "G_OnDropM(" + aDataset.id + ", " + aGrid.id + ", index, colid, data);"));
>                                aGrid.attachEvent ("OnDropDown", new Function("colid", "index", "G_OnDropDownM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnEnter", new Function("colid", "index", "G_OnEnterM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnError", new Function("ecode", "estring", "G_OnErrorM(" + aDataset.id + ", " + aGrid.id + ", ecode, estring);"));
>                                aGrid.attachEvent ("OnExit", new Function("colid", "index", "orgtext", "return G_OnExitM(" + aDataset.id + ", " + aGrid.id + ", index, colid, orgtext);"));
>                                aGrid.attachEvent ("OnExpanded", new Function("index", "G_OnExpandedM(" + aDataset.id + ", " + aGrid.id + ", index);"));
>                                aGrid.attachEvent ("OnExpanding", new Function("index", "return G_OnExpandingM(" + aDataset.id + ", " + aGrid.id + ", index);"));
>                                aGrid.attachEvent ("OnFirstUp", new Function("G_OnFirstUpM(" + aDataset.id + ", " + aGrid.id + ");"));
>                                aGrid.attachEvent ("OnHeadCheckClick", new Function("G_OnHeadCheckClickM(" + aDataset.id + ", " + aGrid.id + ");"));
>                                aGrid.attachEvent ("OnKeyDown", new Function("kcode,keystate", "return G_OnKeyDownM(" + aDataset.id + ", " + aGrid.id + ", kcode,keystate);"));
>                                aGrid.attachEvent ("OnKillFocus", new Function("G_OnKillFocusM(" + aDataset.id + ", " + aGrid.id + ");"));
>                                aGrid.attachEvent ("OnLastDown", new Function("G_OnLastDownM(" + aDataset.id + ", " + aGrid.id + ");"));
>                                aGrid.attachEvent ("OnLButtonDblClk", new Function("type","index", "colid", "x", "y", "G_OnLButtonDblClkM(" + aDataset.id + ", " + aGrid.id + ", type, index, colid, x, y);"));
>                                aGrid.attachEvent ("OnLButtonDown", new Function("type","index", "colid", "x", "y", "G_OnLButtonDownM(" + aDataset.id + ", " + aGrid.id + ", type, index, colid, x, y);"));
>                                aGrid.attachEvent ("OnLButtonUp", new Function("type","index", "colid", "x", "y", "G_OnLButtonUpM(" + aDataset.id + ", " + aGrid.id + ", type, index, colid, x, y);"));
>                                aGrid.attachEvent ("OnMenuSelected", new Function("code", "text", "G_OnMenuSelectedM(" + aDataset.id + ", " + aGrid.id + ", code, text);"));
>                                aGrid.attachEvent ("OnPaste", new Function("colid", "index", "G_OnPasteM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnPopup", new Function("colid", "index", "flag", "G_OnPopupM(" + aDataset.id + ", " + aGrid.id + ", index, colid, flag);"));
>                                aGrid.attachEvent ("OnRButtonDblClk", new Function("type","index", "colid", "x", "y", "G_OnRButtonDblClkM(" + aDataset.id + ", " + aGrid.id + ", type, index, colid, x, y);"));
>                                aGrid.attachEvent ("OnRButtonDown", new Function("type","index", "colid", "x", "y", "G_OnRButtonDownM(" + aDataset.id + ", " + aGrid.id + ", type, index, colid, x, y);"));
>                                aGrid.attachEvent ("OnRButtonUp", new Function("type","index", "colid", "x", "y", "G_OnRButtonUpM(" + aDataset.id + ", " + aGrid.id + ", type, index, colid, x, y);"));
>                                aGrid.attachEvent ("OnSelChange", new Function("colid", "index", "return G_OnSelChangeM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnSelChanged", new Function("colid", "index", "G_OnSelChangedM(" + aDataset.id + ", " + aGrid.id + ", index, colid);"));
>                                aGrid.attachEvent ("OnSetFocus", new Function("G_OnSetFocusM(" + aDataset.id + ", " + aGrid.id + ");"));
>                        }
>                }
>        }
>        catch (e)
>        {
>                C_msgOk("Grid 초기화 에러 : " + e.message, "에러");
>                return false;
>        }
>        
>        return true;
>}
번호 제목 닉네임 조회 등록일
3585 activex설치페이지 오류현상 확인요청
기술지원40
1904 2010-07-23
3584 Tree맵 멀티선택 구현 방법 파일
이주영
1641 2010-07-12
3583 Tree맵 멀티선택 구현 방법
기술지원97
1768 2010-07-27
3582 Mgrid와 Dataset의 연결이 안&#46093;니다.
이철우
1756 2010-07-09
Selected Mgrid와 Dataset의 연결이 안&#46093;니다.
기술지원97
1785 2010-07-27
3580 mxcombo(select박스) 클릭시 열리지가 않아요
최진호
2292 2010-07-09
3579 mxcombo(select박스) 클릭시 열리지가 않아요
기술지원48
1530 2010-07-20
3578 grid 내의 lux combo editable 설정 문제 파일
원성필
1759 2010-07-09
3577 grid 내의 lux combo editable 설정 문제
기술지원97
1548 2010-07-27
3576 에러 내용 질문입니다
임석우
1441 2010-07-09
3575 에러 내용 질문입니다
기술지원31
1526 2010-07-13
3574 그리드내의 컬럼 관련 질문입니다
오유진
2009 2010-07-08
3573 그리드내의 컬럼 관련 질문입니다
기술지원31
1671 2010-07-13
3572 2010.07 max 1.2.1 제공 패치
박노성
1489 2010-07-07
3571 2010.07 max 1.2.1 제공 패치
기술지원10
1437 2010-07-07
3570 MGridU의 컬럼 표시 문제 파일
유해정
1467 2010-07-06
3569 MGridU의 컬럼 표시 문제
기술지원40
1409 2010-07-07
3568 MGridU의 컬럼 표시 문제
유해정
1435 2010-07-08
3567 Report Computaion Column 질문..
박건태
1453 2010-07-05
3566 Report Computaion Column 질문..
기술지원40
1488 2010-07-07
Tag List
XE Login