home *** CD-ROM | disk | FTP | other *** search
- '-----------------------------------------------------------------------------
- ' This is a part of the BeeGrid ActiveX control.
- ' Copyright ⌐ 2000 Stinga
- ' All rights reserved.
- '
- ' You have a right to use and distribute the BeeGrid sample files in original
- ' form or modified, provided that you agree that Stinga has no warranty,
- ' obligations, or liability for any sample application files.
- '-----------------------------------------------------------------------------
- Option Strict Off
- Imports System
- Imports System.ComponentModel
- Imports System.Drawing
- Imports System.WinForms
- Imports Microsoft.VisualBasic
-
- Imports System.Data
- Imports System.Data.SQL
-
- Namespace Win32Form1Namespace
-
- Public Class BeeGrid
- Inherits System.WinForms.Form
-
- 'Required by the Win Forms Designer
- Private components As System.ComponentModel.Container
- Private mMenu As System.WinForms.MainMenu
- Private WithEvents Button1 As System.WinForms.Button
- Private WithEvents Button2 As System.WinForms.Button
- Private AxSGGrid1 As AxBeeGridOLEDB10.AxSGGrid
-
- Public Sub New()
- MyBase.New
-
- 'This call is required by the Win Forms Designer.
- InitializeComponent
-
- End Sub
-
- 'Clean up any resources being used
- Overrides Public Sub Dispose()
- MyBase.Dispose
- components.Dispose
- End Sub
-
- 'The main entry point for the application
- Shared Sub Main()
- System.WinForms.Application.Run(New BeeGrid())
- End Sub
-
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Me.AxSGGrid1 = New AxBeeGridOLEDB10.AxSGGrid
- Me.Button1 = New System.WinForms.Button
-
- AxSGGrid1.BeginInit()
-
- AxSGGrid1.TabIndex = 0
- AxSGGrid1.Size = New System.Drawing.Size(464, 320)
-
- Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
- Me.Text = "VB.NET BeeGrid Example"
- '@design Me.TrayLargeIcon = True
- '@design Me.TrayHeight = 0
- Me.ClientSize = New System.Drawing.Size(472, 373)
-
- Button1.Location = New System.Drawing.Point(328, 328)
- Button1.Size = New System.Drawing.Size(112, 32)
- Button1.TabIndex = 1
- Button1.Text = "Close"
-
- Me.Controls.Add(Button1)
- Me.Controls.Add(AxSGGrid1)
-
- AxSGGrid1.EndInit()
- PopulateGrid
- End Sub
-
- Protected Sub PopulateGrid()
- Dim i as Integer
- Dim j As Integer
-
- With Me.AxSGGrid1
- .DataColCount = 10
- .DataRowCount = 30
- .AllowEdit = True
- .AllowAddNew = True
-
- For i = 0 To .DataColCount - 1
- For j = 0 To .DataRowCount - 1
- .Array.Value(j, i) = "Col " & i & " row " & j
- Next
- Next
- End With
- End Sub
-
- Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
-
- Me.Close
-
- End Sub
-
- End Class
-
- End Namespace
-