Q&A
HOME
Tips & Tech
Q&A
Discuss
Download
자유게시판
홍보 / 광고
구인 / 구직
LOGIN
회원가입
데이터파일을 스트링그리드에..
데이터파일을 스트링그리드에 보여줄려고 하는데여...어떻게 해야할지 난감하네여..
데이터파일은
01 12
23 13
23 45
. .
. .
. .
이런식으루 형식은 같거든여??
파일을 로드해서 그리드에 보여주면 좋겠는데..
고수님들의 답변 부탁드립니다...
며칠전에 질문했는데..아직까지두...흑흑..이번엔 꼭 믿겠습니다.
2
COMMENTS
HART
•
2000.05.26 00:57
아래 소스는 디비내용을 그리디에 데이터를 보여줄는 소스입니다. 제가 작성한 소스데 조금은 엉성했도 한번 참고 했보세요..
그럼 수고하세요..
procedure TFS_SalesQuotation.Grid_init; //그리드 초기화
begin
Grid_Quotation2.ColCount := 6;
Grid_Quotation2.RowCount := 2;
Grid_Quotation2.ColWidths[00] := 080; //품목
Grid_Quotation2.ColWidths[01] := 124; //품목명
Grid_Quotation2.ColWidths[02] := 031; //수량
Grid_Quotation2.ColWidths[03] := 072; //단가
Grid_Quotation2.ColWidths[04] := 080; //금액
Grid_Quotation2.ColWidths[05] := 080; //견적금액
// Grid_Quotation2.ColWidths[06] := 000; //구성
// Grid_Quotation2.ColWidths[07] := 000; //메모
Grid_Quotation2.Cells[00,0] := '품목';
Grid_Quotation2.Cells[01,0] := '품목명';
Grid_Quotation2.Cells[02,0] := '수량';
Grid_Quotation2.Cells[03,0] := '단가';
Grid_Quotation2.Cells[04,0] := '금액';
Grid_Quotation2.Cells[05,0] := '견적금액';
Grid_Quotation2.Cells[06,0] := '구성';
Grid_Quotation2.Cells[07,0] := '메모';
Grid_del(1);
Grid_edit_move(Grid_Quotation2.Row);
Grid_edit_clear;
end;
procedure TFS_SalesQuotation.Grid_add; //그리드 추가
begin
if trim(Grid_Quotation2.Cells[1,Grid_Quotation2.RowCount-1]) <> '' then
Grid_Quotation2.RowCount := Grid_Quotation2.RowCount + 1;
Grid_edit(Grid_Quotation2.RowCount-1)
end;
procedure TFS_SalesQuotation.Grid_del(position : integer); //그리드 삭제
var
i : integer;
begin
for i := position to Grid_Quotation2.RowCount - 2 do
begin
Grid_Quotation2.Cells[00,i] := inttostr(i); //품목
Grid_Quotation2.Cells[01,i] := Grid_Quotation2.Cells[01,i+1]; //품목명
Grid_Quotation2.Cells[02,i] := Grid_Quotation2.Cells[02,i+1]; //수량
Grid_Quotation2.Cells[03,i] := Grid_Quotation2.Cells[03,i+1]; //단가
Grid_Quotation2.Cells[04,i] := Grid_Quotation2.Cells[04,i+1]; //금액
Grid_Quotation2.Cells[05,i] := Grid_Quotation2.Cells[05,i+1]; //견적금액
Grid_Quotation2.Cells[06,i] := Grid_Quotation2.Cells[06,i+1]; //구성
Grid_Quotation2.Cells[07,i] := Grid_Quotation2.Cells[07,i+1]; //메모
end;
if Grid_Quotation2.rowCount-1 >= position then
begin
Grid_Quotation2.Cells[00,Grid_Quotation2.RowCount - 1] := ''; //품목
Grid_Quotation2.Cells[01,Grid_Quotation2.RowCount - 1] := ''; //품목명
Grid_Quotation2.Cells[02,Grid_Quotation2.RowCount - 1] := '0'; //수량
Grid_Quotation2.Cells[03,Grid_Quotation2.RowCount - 1] := '0'; //단가
Grid_Quotation2.Cells[04,Grid_Quotation2.RowCount - 1] := '0'; //금액
Grid_Quotation2.Cells[05,Grid_Quotation2.RowCount - 1] := '0'; //견적금액
Grid_Quotation2.Cells[06,Grid_Quotation2.RowCount - 1] := ''; //구성
Grid_Quotation2.Cells[07,Grid_Quotation2.RowCount - 1] := ''; //메모
end;
if Grid_Quotation2.RowCount <> 2 then Grid_Quotation2.RowCount := Grid_Quotation2.RowCount - 1;
end;
procedure TFS_SalesQuotation.Grid_edit(position : integer); //그리드 수정
begin
if Grid_Quotation2.RowCount - 1 >= position then
begin
Grid_Quotation2.Cells[00,position] := P_SALE_GOODS_ID; //품목
Grid_Quotation2.Cells[01,position] := P_SALE_GOODS_NAME; //품목명
Grid_Quotation2.Cells[02,position] := P_QTY; //수량
Grid_Quotation2.Cells[03,position] := P_UNIT_PRICE; //단가
Grid_Quotation2.Cells[04,position] := P_AMOUNT; //금액
Grid_Quotation2.Cells[05,position] := P_DC_AMOUNT; //견적금액
Grid_Quotation2.Cells[06,position] := P_COMPOSITION; //구성
Grid_Quotation2.Cells[07,position] := P_MEMO; //메모
end;
end;
heimdal wrote:
> 데이터파일을 스트링그리드에 보여줄려고 하는데여...어떻게 해야할지 난감하네여..
>
> 데이터파일은
> 01 12
> 23 13
> 23 45
> . .
> . .
> . .
>
> 이런식으루 형식은 같거든여??
> 파일을 로드해서 그리드에 보여주면 좋겠는데..
>
> 고수님들의 답변 부탁드립니다...
> 며칠전에 질문했는데..아직까지두...흑흑..이번엔 꼭 믿겠습니다.
0
0
삭제
수정
댓글
heimdal
•
2000.05.26 05:18
근데 이렇게 컬럼수와 로우수가 일정하다면 그렇게하는게 가능한데여..
열의 갯수는 일정하지만 행의 갯수가 일정하지않아서여...
그럼 동적배열로 해야한다는 얘긴데...막막하네여..
어떻하면 좋죠??
HART wrote:
> 아래 소스는 디비내용을 그리디에 데이터를 보여줄는 소스입니다. 제가 작성한 소스데 조금은 엉성했도 한번 참고 했보세요..
>
> 그럼 수고하세요..
>
>
> procedure TFS_SalesQuotation.Grid_init; //그리드 초기화
> begin
> Grid_Quotation2.ColCount := 6;
> Grid_Quotation2.RowCount := 2;
> Grid_Quotation2.ColWidths[00] := 080; //품목
> Grid_Quotation2.ColWidths[01] := 124; //품목명
> Grid_Quotation2.ColWidths[02] := 031; //수량
> Grid_Quotation2.ColWidths[03] := 072; //단가
> Grid_Quotation2.ColWidths[04] := 080; //금액
> Grid_Quotation2.ColWidths[05] := 080; //견적금액
> // Grid_Quotation2.ColWidths[06] := 000; //구성
> // Grid_Quotation2.ColWidths[07] := 000; //메모
>
> Grid_Quotation2.Cells[00,0] := '품목';
> Grid_Quotation2.Cells[01,0] := '품목명';
> Grid_Quotation2.Cells[02,0] := '수량';
> Grid_Quotation2.Cells[03,0] := '단가';
> Grid_Quotation2.Cells[04,0] := '금액';
> Grid_Quotation2.Cells[05,0] := '견적금액';
> Grid_Quotation2.Cells[06,0] := '구성';
> Grid_Quotation2.Cells[07,0] := '메모';
> Grid_del(1);
> Grid_edit_move(Grid_Quotation2.Row);
> Grid_edit_clear;
> end;
>
> procedure TFS_SalesQuotation.Grid_add; //그리드 추가
> begin
> if trim(Grid_Quotation2.Cells[1,Grid_Quotation2.RowCount-1]) <> '' then
> Grid_Quotation2.RowCount := Grid_Quotation2.RowCount + 1;
> Grid_edit(Grid_Quotation2.RowCount-1)
> end;
>
> procedure TFS_SalesQuotation.Grid_del(position : integer); //그리드 삭제
> var
> i : integer;
> begin
> for i := position to Grid_Quotation2.RowCount - 2 do
> begin
> Grid_Quotation2.Cells[00,i] := inttostr(i); //품목
> Grid_Quotation2.Cells[01,i] := Grid_Quotation2.Cells[01,i+1]; //품목명
> Grid_Quotation2.Cells[02,i] := Grid_Quotation2.Cells[02,i+1]; //수량
> Grid_Quotation2.Cells[03,i] := Grid_Quotation2.Cells[03,i+1]; //단가
> Grid_Quotation2.Cells[04,i] := Grid_Quotation2.Cells[04,i+1]; //금액
> Grid_Quotation2.Cells[05,i] := Grid_Quotation2.Cells[05,i+1]; //견적금액
> Grid_Quotation2.Cells[06,i] := Grid_Quotation2.Cells[06,i+1]; //구성
> Grid_Quotation2.Cells[07,i] := Grid_Quotation2.Cells[07,i+1]; //메모
> end;
> if Grid_Quotation2.rowCount-1 >= position then
> begin
> Grid_Quotation2.Cells[00,Grid_Quotation2.RowCount - 1] := ''; //품목
> Grid_Quotation2.Cells[01,Grid_Quotation2.RowCount - 1] := ''; //품목명
> Grid_Quotation2.Cells[02,Grid_Quotation2.RowCount - 1] := '0'; //수량
> Grid_Quotation2.Cells[03,Grid_Quotation2.RowCount - 1] := '0'; //단가
> Grid_Quotation2.Cells[04,Grid_Quotation2.RowCount - 1] := '0'; //금액
> Grid_Quotation2.Cells[05,Grid_Quotation2.RowCount - 1] := '0'; //견적금액
> Grid_Quotation2.Cells[06,Grid_Quotation2.RowCount - 1] := ''; //구성
> Grid_Quotation2.Cells[07,Grid_Quotation2.RowCount - 1] := ''; //메모
> end;
> if Grid_Quotation2.RowCount <> 2 then Grid_Quotation2.RowCount := Grid_Quotation2.RowCount - 1;
> end;
>
> procedure TFS_SalesQuotation.Grid_edit(position : integer); //그리드 수정
> begin
> if Grid_Quotation2.RowCount - 1 >= position then
> begin
> Grid_Quotation2.Cells[00,position] := P_SALE_GOODS_ID; //품목
> Grid_Quotation2.Cells[01,position] := P_SALE_GOODS_NAME; //품목명
> Grid_Quotation2.Cells[02,position] := P_QTY; //수량
> Grid_Quotation2.Cells[03,position] := P_UNIT_PRICE; //단가
> Grid_Quotation2.Cells[04,position] := P_AMOUNT; //금액
> Grid_Quotation2.Cells[05,position] := P_DC_AMOUNT; //견적금액
> Grid_Quotation2.Cells[06,position] := P_COMPOSITION; //구성
> Grid_Quotation2.Cells[07,position] := P_MEMO; //메모
> end;
> end;
>
>
> heimdal wrote:
> > 데이터파일을 스트링그리드에 보여줄려고 하는데여...어떻게 해야할지 난감하네여..
> >
> > 데이터파일은
> > 01 12
> > 23 13
> > 23 45
> > . .
> > . .
> > . .
> >
> > 이런식으루 형식은 같거든여??
> > 파일을 로드해서 그리드에 보여주면 좋겠는데..
> >
> > 고수님들의 답변 부탁드립니다...
> > 며칠전에 질문했는데..아직까지두...흑흑..이번엔 꼭 믿겠습니다.
0
0
삭제
수정
댓글
(NOTICE) You must be
logged in
to comment on this post.
문형록
•
2000.05.26 02:16
2
COMMENTS
/
0
LIKES
stringgrid 의 수치를 tchart를 이용하여 출력하는데...
HART
•
2000.05.26 02:32
아래소스는 Tchart에 막대 그래프을 이용한 예제임. tchart를 데이터를 입력하는 방법만 알면 생각 보다 ...
문형록
•
2000.05.27 02:30
HART wrote: > 아래소스는 Tchart에 막대 그래프을 이용한 예제임. > tchart를 데이터를 입력하는 방법만...
궁금한넘
2000.05.26 02:12
0
COMMENTS
/
0
LIKES
[인터넷] 인터넷에대해..
이언주
2000.05.26 02:04
0
COMMENTS
/
0
LIKES
어떻게 인쇄를 해야 할지 몰라유~!
용가리
•
2000.05.26 01:59
1
COMMENTS
/
0
LIKES
15949 재질의 퀵리포트(소계,총계 구하기)
HART
•
2000.05.26 02:28
세금계산서 합계표에서 합계는 구하려면 만약 데이터 건수가 작으면 그냥 while 문으로 합계를 구해서 처...
용가리
•
2000.05.26 01:47
1
COMMENTS
/
0
LIKES
퀵리포트 Help Me (소계, 총계 구하기)
HART
•
2000.05.26 01:55
TQRExpr라는 컴포넌트 이용하여 총계를 구할 수 있습니다... 용가리 wrote: > SELECT Chse_vend거래처,...
델초보
2000.05.26 01:39
0
COMMENTS
/
0
LIKES
ADO로 연결할때.........
초보델피언
2000.05.26 01:37
0
COMMENTS
/
0
LIKES
멀티랭귀지는 어떻게 하죠??
사발우성
•
2000.05.26 01:37
1
COMMENTS
/
0
LIKES
허걱 .... 이런 뭔이런게 다있쥐.... ㅠ.ㅠ
최석기
•
2000.05.26 02:51
사발우성 wrote: > > 지가엽... 모달폼을 열면서 메인폼을 닫을라구 > > showwindow(handel,sw_hid...
heimdal
2000.05.26 00:55
0
COMMENTS
/
0
LIKES
Comport??
HART
2000.05.26 00:48
0
COMMENTS
/
0
LIKES
Re: 퀵레포트에서 메모리문제
가련한 초보가..
•
2000.05.26 00:34
2
COMMENTS
/
0
LIKES
이걸 어케 해결한다..??..도사님~~
HART
•
2000.05.26 00:43
저도 1문제는 정확히 몰라요.. 그러나 2문제는 간단한 방법이 있습니다.. dataset(Table, Tquery)의 이벤...
도와주세요..도사님..
•
2000.05.26 00:54
답변 감사합니다. 멋진 사이트입니다. 다시한번 감사드립니다..
류인선
•
2000.05.26 00:27
3
COMMENTS
/
0
LIKES
MainForm에 Control이 있고 Child Form에 Control이 있을때...
HART
•
2000.05.26 00:38
childform를 먼저 show를 하고 해보세요..혹시나 . 그리고 mail 폼에 panel를 올리면 childform보다 위로 ...
류인선
•
2000.05.26 01:03
음...그것이...ChidForm은 이미 보이는 상태이구요.. Panel이 Align := alBottom으로 되어있습니다.. 그...
HART
•
2000.05.26 01:18
제가 테스트 할 결과 포커스가 잘 이동함... 한번 다시 해보세요.. 그럼 수고 하세요....
델초
•
2000.05.26 00:20
1
COMMENTS
/
0
LIKES
분류먼저 해주시길 부탁드립니다.
HART
•
2000.05.26 00:31
퀵리포트를 한번도 사용하지 안는 것 같은데.. 델파이 데모에 보면 퀴리포트 예제가 있는데. 먼저 보시고 ...
최현수
•
2000.05.26 00:07
2
COMMENTS
/
0
LIKES
퀵레포트에서...
HART
•
2000.05.26 00:15
TQuickRep의 DataSet에 query1를 연결 하지 했는지 보세요.. 아마 그것 때문에 그런것 같은데.. 그럼 수...
최현수
•
2000.05.26 18:37
오호라.. 그런 곳에 또 연결을 시켜 줘야 하다니... 흠냐, 전혀 몰랐시라.. 고치니께 바루 되던데용... ...
파이공주
•
2000.05.26 00:05
1
COMMENTS
/
0
LIKES
오빠...cab file에 .inf 설치정보 파일이 안생겨요..
채재호
•
2000.05.26 03:00
파이공주 wrote: > cab file에 .inf 설치정보 파일이 안생겨요.. > > 설치정보 파일을 만들려면 어떻게...
최 소 영
•
2000.05.26 00:01
3
COMMENTS
/
0
LIKES
콤포넌트 설치허면서 에러..
HART
•
2000.05.26 00:19
delphin 밑에 lib 디렉토리에 모두 복사하고 설치해봐요.. 혹시 패스가 잘못될 수 있으니까요.. 그럼 수고...
최 소 영
•
2000.05.26 01:36
HART wrote: > delphin 밑에 lib 디렉토리에 모두 복사하고 설치해봐요.. 혹시 패스가 잘못될 수 있으니까...
HART
•
2000.05.26 02:50
여기 자료실에 보면 ansy33.zip으로 있는 것 같은데... 한번 다운 받아서 해보세요... 컴포넌트 등록...
이선우
2000.05.26 18:44
0
COMMENTS
/
0
LIKES
MySQL에서 DateTime 처리 방법 좀....급해요..
heimdal
•
2000.05.25 23:37
2
COMMENTS
/
0
LIKES
데이터파일을 스트링그리드에..
데이터파일을 스트링그리드에 보여줄려고 하는데여...어떻게 해야할지 난감하네여.. 데이터파일은 01 12 23 13 23 45 . . . . . . 이런식으루 형식은 같거든여?? 파일을 로드해서 그리드에 보여주면 좋겠는데.. 고수님들의 답변 부탁드립...
HART
•
2000.05.26 00:57
아래 소스는 디비내용을 그리디에 데이터를 보여줄는 소스입니다. 제가 작성한 소스데 조금은 엉성했도 한...
heimdal
•
2000.05.26 05:18
근데 이렇게 컬럼수와 로우수가 일정하다면 그렇게하는게 가능한데여.. 열의 갯수는 일정하지만 행의 갯...
youcom
•
2000.05.25 23:28
1
COMMENTS
/
0
LIKES
인스톨쉴드에서 알리아스 경로를?
초보
•
2000.05.26 00:28
youcom wrote: > 안녕하세요 델파이여러분 > 인스톨쉴드에서 알리아스 경로를 패스지정을 해주었는데도 ...
송인섭
•
2000.05.25 23:10
1
COMMENTS
/
0
LIKES
스트링을 헥사코드로 변환해서 화일로 만들기
타락천사
•
2000.05.25 23:36
안녕하세여.. 타락임다. ^^ procedure TForm1.BitBtn1Click(Sender: TObject); var szBuf : array [...
heimdal
2000/05/25 23:37
Views
205
Likes
0
Comments
2
Reports
0
Tag List
수정
삭제
목록으로
한델 로그인 하기
로그인 상태 유지
아직 회원이 아니세요? 가입하세요!
암호를 잊어버리셨나요?
그럼 수고하세요..
procedure TFS_SalesQuotation.Grid_init; //그리드 초기화
begin
Grid_Quotation2.ColCount := 6;
Grid_Quotation2.RowCount := 2;
Grid_Quotation2.ColWidths[00] := 080; //품목
Grid_Quotation2.ColWidths[01] := 124; //품목명
Grid_Quotation2.ColWidths[02] := 031; //수량
Grid_Quotation2.ColWidths[03] := 072; //단가
Grid_Quotation2.ColWidths[04] := 080; //금액
Grid_Quotation2.ColWidths[05] := 080; //견적금액
// Grid_Quotation2.ColWidths[06] := 000; //구성
// Grid_Quotation2.ColWidths[07] := 000; //메모
Grid_Quotation2.Cells[00,0] := '품목';
Grid_Quotation2.Cells[01,0] := '품목명';
Grid_Quotation2.Cells[02,0] := '수량';
Grid_Quotation2.Cells[03,0] := '단가';
Grid_Quotation2.Cells[04,0] := '금액';
Grid_Quotation2.Cells[05,0] := '견적금액';
Grid_Quotation2.Cells[06,0] := '구성';
Grid_Quotation2.Cells[07,0] := '메모';
Grid_del(1);
Grid_edit_move(Grid_Quotation2.Row);
Grid_edit_clear;
end;
procedure TFS_SalesQuotation.Grid_add; //그리드 추가
begin
if trim(Grid_Quotation2.Cells[1,Grid_Quotation2.RowCount-1]) <> '' then
Grid_Quotation2.RowCount := Grid_Quotation2.RowCount + 1;
Grid_edit(Grid_Quotation2.RowCount-1)
end;
procedure TFS_SalesQuotation.Grid_del(position : integer); //그리드 삭제
var
i : integer;
begin
for i := position to Grid_Quotation2.RowCount - 2 do
begin
Grid_Quotation2.Cells[00,i] := inttostr(i); //품목
Grid_Quotation2.Cells[01,i] := Grid_Quotation2.Cells[01,i+1]; //품목명
Grid_Quotation2.Cells[02,i] := Grid_Quotation2.Cells[02,i+1]; //수량
Grid_Quotation2.Cells[03,i] := Grid_Quotation2.Cells[03,i+1]; //단가
Grid_Quotation2.Cells[04,i] := Grid_Quotation2.Cells[04,i+1]; //금액
Grid_Quotation2.Cells[05,i] := Grid_Quotation2.Cells[05,i+1]; //견적금액
Grid_Quotation2.Cells[06,i] := Grid_Quotation2.Cells[06,i+1]; //구성
Grid_Quotation2.Cells[07,i] := Grid_Quotation2.Cells[07,i+1]; //메모
end;
if Grid_Quotation2.rowCount-1 >= position then
begin
Grid_Quotation2.Cells[00,Grid_Quotation2.RowCount - 1] := ''; //품목
Grid_Quotation2.Cells[01,Grid_Quotation2.RowCount - 1] := ''; //품목명
Grid_Quotation2.Cells[02,Grid_Quotation2.RowCount - 1] := '0'; //수량
Grid_Quotation2.Cells[03,Grid_Quotation2.RowCount - 1] := '0'; //단가
Grid_Quotation2.Cells[04,Grid_Quotation2.RowCount - 1] := '0'; //금액
Grid_Quotation2.Cells[05,Grid_Quotation2.RowCount - 1] := '0'; //견적금액
Grid_Quotation2.Cells[06,Grid_Quotation2.RowCount - 1] := ''; //구성
Grid_Quotation2.Cells[07,Grid_Quotation2.RowCount - 1] := ''; //메모
end;
if Grid_Quotation2.RowCount <> 2 then Grid_Quotation2.RowCount := Grid_Quotation2.RowCount - 1;
end;
procedure TFS_SalesQuotation.Grid_edit(position : integer); //그리드 수정
begin
if Grid_Quotation2.RowCount - 1 >= position then
begin
Grid_Quotation2.Cells[00,position] := P_SALE_GOODS_ID; //품목
Grid_Quotation2.Cells[01,position] := P_SALE_GOODS_NAME; //품목명
Grid_Quotation2.Cells[02,position] := P_QTY; //수량
Grid_Quotation2.Cells[03,position] := P_UNIT_PRICE; //단가
Grid_Quotation2.Cells[04,position] := P_AMOUNT; //금액
Grid_Quotation2.Cells[05,position] := P_DC_AMOUNT; //견적금액
Grid_Quotation2.Cells[06,position] := P_COMPOSITION; //구성
Grid_Quotation2.Cells[07,position] := P_MEMO; //메모
end;
end;
heimdal wrote:
> 데이터파일을 스트링그리드에 보여줄려고 하는데여...어떻게 해야할지 난감하네여..
>
> 데이터파일은
> 01 12
> 23 13
> 23 45
> . .
> . .
> . .
>
> 이런식으루 형식은 같거든여??
> 파일을 로드해서 그리드에 보여주면 좋겠는데..
>
> 고수님들의 답변 부탁드립니다...
> 며칠전에 질문했는데..아직까지두...흑흑..이번엔 꼭 믿겠습니다.