DBGrid - Özellikler
Aling
AllowAddNew
AllowRows
AllowDelete
AllowUpdate
Appearance
BackColor
BorderStyle
Caption
CausesValidation
ColumnHeaders
DataMode
DataSource
DefColWidth
DragIcon
DragMOde
Enabled
Font
ForeColor
HeadFont
HealdLines
Height
HelpContextID
Index
Left
MarqueeUnique
Negotiate
RowDividerStyle
RowHeight
TabAcrossSplits
TabAction
TabIndex
TabStop
Tag
ToolTipText
Top
Visible
WhatsThisHelpID
Width
DBGrid - Olaylar
AfterColEdit
AfterColUpdate
AfterDelete
AfterInsert
AfterUpdate
BeforeColEdit
BeforeColUpdate
BeforeDelete
BeforeInsert
BeforeUpdate
ButtonClick
Change
Click
ColEdit
ColResize
GotFocus
HeadClick
KeyDown
KeyPress
KeyUp
LostFocus
MouseDown
MouseMove
MouseUp
OnAddNew
RowColChange
DblClick
DragDrop
DragOver
Error
RowResize
Scroll
SelChange
SplitChange
UnboundAddData
UnboundDeleteRow
UnboundDeleteGetrelativeBBookmark
UnboundReadData
UnboundWriteData
Validate
DBGrid - Yöntemler
AboutBox
CaptureImage
ClearFields
ClearSelCols
ColContaining
Drag
GetBookmark
HoldFields
Move
Rebind
Refresh
RowBookmark
RowContaining
RowTop
Scroll
SetFocus
ShowWhatsThis
ZOrder
DBGrid - Data Kontrol
Private Sub Form_Load()
Form1.Caption = " DBGrid ve Data Kontrol"
With Data1 ‘ Data kontrol ayarları
.Align = 2
.DatabaseName = "Personel.mdb"
.RecordSource = " Select * from Kisiler"
End With
With DBGrid1 ‘ DBGrid1 kontrol ayarları
Set .DataSource = Data1
.Align = 1
.AllowAddNew = True ‘ Kayıt girişi, silinmesi
.AllowDelete = True ‘ ve düzeltilmesi
.AllowUpdate = True ‘ otomatik yapılıyor
.ColumnHeaders = True
End With
End Sub
Private Sub Data1_Reposition() ‘ Data1 başlığı
Data1.Caption = Data1.Recordset.AbsolutePosition + 1 & "/" & _
Data1.Recordset.RecordCount
End Sub
Private Sub DBGrid1_HeadClick(ByVal ColIndex As Integer) ‘ Başlığa göre sıralama
Data1.RecordSource = "select * from kisiler Order By " & _
DBGrid1.Columns(ColIndex).DataField
Data1.Refresh
End Sub
Aling
AllowAddNew
AllowRows
AllowDelete
AllowUpdate
Appearance
BackColor
BorderStyle
Caption
CausesValidation
ColumnHeaders
DataMode
DataSource
DefColWidth
DragIcon
DragMOde
Enabled
Font
ForeColor
HeadFont
HealdLines
Height
HelpContextID
Index
Left
MarqueeUnique
Negotiate
RowDividerStyle
RowHeight
TabAcrossSplits
TabAction
TabIndex
TabStop
Tag
ToolTipText
Top
Visible
WhatsThisHelpID
Width
DBGrid - Olaylar
AfterColEdit
AfterColUpdate
AfterDelete
AfterInsert
AfterUpdate
BeforeColEdit
BeforeColUpdate
BeforeDelete
BeforeInsert
BeforeUpdate
ButtonClick
Change
Click
ColEdit
ColResize
GotFocus
HeadClick
KeyDown
KeyPress
KeyUp
LostFocus
MouseDown
MouseMove
MouseUp
OnAddNew
RowColChange
DblClick
DragDrop
DragOver
Error
RowResize
Scroll
SelChange
SplitChange
UnboundAddData
UnboundDeleteRow
UnboundDeleteGetrelativeBBookmark
UnboundReadData
UnboundWriteData
Validate
DBGrid - Yöntemler
AboutBox
CaptureImage
ClearFields
ClearSelCols
ColContaining
Drag
GetBookmark
HoldFields
Move
Rebind
Refresh
RowBookmark
RowContaining
RowTop
Scroll
SetFocus
ShowWhatsThis
ZOrder
DBGrid - Data Kontrol
Private Sub Form_Load()
Form1.Caption = " DBGrid ve Data Kontrol"
With Data1 ‘ Data kontrol ayarları
.Align = 2
.DatabaseName = "Personel.mdb"
.RecordSource = " Select * from Kisiler"
End With
With DBGrid1 ‘ DBGrid1 kontrol ayarları
Set .DataSource = Data1
.Align = 1
.AllowAddNew = True ‘ Kayıt girişi, silinmesi
.AllowDelete = True ‘ ve düzeltilmesi
.AllowUpdate = True ‘ otomatik yapılıyor
.ColumnHeaders = True
End With
End Sub
Private Sub Data1_Reposition() ‘ Data1 başlığı
Data1.Caption = Data1.Recordset.AbsolutePosition + 1 & "/" & _
Data1.Recordset.RecordCount
End Sub
Private Sub DBGrid1_HeadClick(ByVal ColIndex As Integer) ‘ Başlığa göre sıralama
Data1.RecordSource = "select * from kisiler Order By " & _
DBGrid1.Columns(ColIndex).DataField
Data1.Refresh
End Sub
