• 고객센터
  • 교육
  • 매뉴얼
  • 데모
  • 제품소개
조회 수 : 1762
2010.07.09 (14:42:21)
게시판을 이용해 주셔서 감사합니다.
다음양식에 맞게 입력해주세요.

* 고객시스템명 : 대전도시공사
* 문의할 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;
}
번호 제목 닉네임 조회 등록일
4605 no image combo 박스
민성4
6136 2017-03-28
4604 no image Mgrid 에서 type = lookup 일때 lookup 이벤트는 어떤 건가요???
임동빈
6070 2016-03-24
4603 no image 그리드내 콤보 선택시 문제 [1]
비스타21
6018 2016-02-19
4602 no image 10억단위 @SUM시 -로 보이는 현상 문의드립니다. [1]
동긔나긔
22606 2016-02-04
4601 no image 컴포넌트 인스톨러 요청(육군간호사관학교) 파일 [1]
영희
7673 2016-01-20
4600 no image GirdToExcel 시 틀고정 적용 [1]
OOGway
5642 2016-01-14
4599 no image IE11 에서 Event 적용 안되는 문제 [1]
nsitc
7719 2016-01-12
4598 no image 액티브업데이트 다운로드 권한 요청 [1]
ㅈㅇ
6542 2016-01-07
4597 no image Excel.Application 사용 문의 드립니다. [1]
서은형
8119 2015-12-03
4596 no image 가우스 컴포넌트 설치시 발생하는 문제 [1]
자바개발자IT
58317 2015-10-23
4595 no image IE 11버전에서 Dataset 컴포넌트 메서드 오류 현상 [1]
자바개발자IT
7782 2015-10-02
게시판을 이용해 주셔서 감사합니다. 다음양식에 맞게 입력해주세요. * 고객시스템명 : LG 전자 SCM Dashboard * 문의할 Component명 및 버전 : MxDataSetU Component * DataSet 버전 : 2.0.1.92 * Tr 버전 : * 문의 유형(질문/요청/참조) : 질문, 요청 * 내용 : 안녕하세요. LG 전자 Internet Explorer 버전은 8버전입니다. 현재 해당 버전에서 문제없이 동작하고 있는데요. 이제 곧 Internet Explorer버전을 11로 올리게 되어 IE11버전에서 테스트 진행중에 있습니다. 먼저 질문드리는 내용은 가우스는 IE 11 버전에서 호환성 보기에 목록을 추가하지 않으면 정상 동작이 불가능한 툴인가요? 호환성 보기를 추가 하지 않으면 컴포넌트의 메소드들이 정상 동작하지 않는 기현상이 발견되었습니다. 그래서 호환성보기에 URL을 추가 한 후 테스트를 진행하였는데, URL을 통한 개발서버에서는 정상 동작하였지만, 본사 싸이트를 통한 도메인 접근시에는 Datase 컴포넌트의 메소드 오류현상이 발생하였습니다. Dataset.Reset(); 부분에서 발생하는데, 관련 메세지는 " 개체가 'Reset' 속성이나 메서드를 지원하지 않습니다. " 로 출력됩니다. URL을 통해서 접근을 하였을 때에는 정상 동작하는 것으로 보아 컴포넌트의 버전문제는 아닌 것으로 판단되지만, 정확한 판단을 위하여 운영환경에 Dataset 컴포넌트 버전을 최신으로 변경하여 적용을 한 후 테스트를 진행하였습니다. 하지만 여전히 동일한 문제가 발생하게 되어 이렇게 게시판에 문의를 드리게 되었습니다. 감사합니다.
4594 Internet Explorer의 작동이 중지되었습니다. 파일 [1]
임지선
7905 2015-08-26
4593 no image 윈도우10 엣지 호환여부 [1]
제임스건
17250 2015-08-06
4592 ActiveX Update 관련 문의 파일 [1]
뭉개
6588 2015-06-25
4591 no image 엑셀 다운로드 관련 문의드립니다. [1]
우르릉쿵쿵
5928 2015-06-25
4590 no image 윈도우 버전 관련 문의 [1]
임지선
6763 2015-06-24
4589 no image 엑셀다운로드 관련하여 문의 드립니다 [1]
우르릉쿵쿵
6086 2015-05-15
4588 no image 엑셀 다운로드 관련 문의합니다. [1]
제임스건
5751 2015-05-12
4587 no image unicode용 max컴포넌트 요청 [1]
최경원
6348 2015-04-30
4586 no image MXRadioU.cab 오류 [1]
명화
5529 2015-04-27
Tag List
XE Login