Arsip: DBGrid Belang

 
user image
more 13 years ago

unank

Dear Teman2, Saya mau nanya untuk membuat DBgrid belang-belang (maksudnya untuk row ganjil warnanya birumuda dan untuk row genap warnanya abu2) gimana caranya ya??ada yang punya codenya ga?? Thanks Temans Regards - Unank -
user image
more 13 years ago

DelphiExpert

laaah... tinggal download disini kan http://pascal-id.org/dpr/Downloads-index-req-viewdownloaddetails-lid-60.pas
user image
more 13 years ago

Soni

http://delphi.about.com/od/usedbvcl/l/aa031699.htm
user image
more 13 years ago

unank

Bos yang ini http://pascal-id.org/dpr/Downloads-index-req-viewdownloaddetails-lid-60.pas ga bisa di download ya??.. saya sudah coba ga bisa di download... Tengkyu...
user image
more 13 years ago

eksant

hmmm... procedure cQueryToGrid(Asql : String; Agrid : TAdvColumnGrid; aShowNumber : Boolean = True); var fQ : TIBQuery; i, j : Integer; FontSizer : Integer; begin fQ := cOpenQuery(Asql); cClearGrid(agrid, true ); Agrid.FixedCols := 1; Agrid.FixedRows := 1; if aShowNumber then begin Agrid.ColWidths[0] := 25; Agrid.Cells[0,0] := 'No'; end else begin Agrid.ColWidths[0] := 10; Agrid.Cells[0,0] := ''; end; FOntSizer := (((AGrid.Font.Size - 3) _add) div _div); Agrid.ColCount := fq.Fields.Count + 1; for i := 0 to fq.fields.Count - 1 do begin Agrid.cells[i + 1, 0] := fq.Fields[i].DisplayName; Agrid.ColWidths[i + 1] := fq.Fields[i].DisplayWidth FontSizer; end; if not fq.eof then begin //Agrid.ColCount := fq.Fields.Count + 1; end else begin exit; end; i := 1; while not fQ.Eof do begin // ganti warna if (i mod 2) = 0 then begin Agrid.RowColor[i] := $FFFFFF; end else begin Agrid.RowColor[i] := $FFF4FF; end; cAddRow(Agrid, true); if aShowNumber then begin Agrid.Cells[0,i]:= IntToStr(i); end; for j := 0 to fq.fields.count - 1 do begin Agrid.cells[j + 1, i] := fq.fields[j].AsString; if Agrid.COlwidths[j + 1] < fq.Fields[j].DisplayWidth FontSizer then begin Agrid.ColWidths[j + 1] := fq.Fields[j].DisplayWidth FontSizer; ; end; end; fq.next; application.ProcessMessages; inc(i, 1); end; FreeAndnIl(fQ); end; Intinya cuma di... // ganti warna if (i mod 2) = 0 then begin Agrid.RowColor[i] := $FFFFFF; end else begin Agrid.RowColor[i] := $FFF4FF; end; boleh koq diganti warna $FFFFFF ato $FFF4FF dicoba ya...
user image
more 13 years ago

unank

Tengkyu Bos Nanti saya coba ...sekali lagi thanks for all
user image
more 13 years ago

eksant

sama2...
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com