Delphi Indonesia - Mobile Edition

nama: pass:

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
erlkOffline
Location:
Post subject: Ngecek data d Stringgrid  PostPosted: 08/Sep/2010 02:57
onNewBie


Joined: 03-Mar-2006
Posts: 2

Status: Offline
maaf para suhu, aku newbieTol yang mw bertanya.....
Bagaimana caranya mengecek data yang sudah masuk d dbgrid?sehingga data yang sama tidak dapat di masukan lagi k stringgrid?
 
 View user's profile Send private message  
Reply with quote Back to top
heriy4nt0Offline
Location:
Post subject: Re: Ngecek data d Stringgrid  PostPosted: 13/Sep/2010 02:05
onKnowledgeable


Joined: 25-Jul-2008
Posts: 145

Status: Offline
misal cek data apakah sudah ada pada colum 1 pada stringgrid :

function cekdatastringgrid(value :string;column:integer):boolean;
..
//cek jika data sudah ada pada stringgrid1
Result:=true;
if stringgrid1.cols[column].indexof(value) > -1 then Exit
else Result:=false

contoh : penggunaan :
dbgrid tidak memiliki property cells, gunakan datasource:cth: adoquery

if not cekdatastringgrid(adoquery1.findfield('nama').asstring,1) then
< do something here>
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits
RSS