Thursday, May 17th 2012, 5:06pm UTC+2

You are not logged in.

  • Login
  • Register

Posts: 95

Location: Oberirsen - Germany

Occupation: Software Engineer

1

Sunday, April 26th 2009, 9:00am

How to use an alternative grid - Quicktable

Hello community,
JBGrid is a great component, but let us look to a much more powerful table grid component called Quick Table. it is easy to use Quick Table with Jabaco. Look at the following code:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Dim table As quick#dbtable#DBTable 
Set table = New DBTable 

table.setSize 600, 300 
table.setVisible True 

'-Set ODBC driver------------------------------------------------------- 
  table.setDatabaseDriver "sun.jdbc.odbc.JdbcOdbcDriver" 
'-Set the database------------------------------------------------------ 
  table.setJdbcUrl "jdbc:odbc:test" 
'-Define a SQL statement------------------------------------------------ 
  table.setSelectSql "SELECT * FROM employee;" 

'-Add the table to the form------------------------------------------- 
  Form1.add table 
'-Adds a control panel with butttons for the table---------------------- 
  table.createControlPanel 
'-Connect the database-------------------------------------------------- 
  table.connectDatabase 

table.refresh 

'-Add a column---------------------------------------------------------- 
  table.addColumn "Test" 

table.refresh


One great possibility is to fill with one SQL statement the grid. No loop or something else to fill the grid line by line. You can sort the table via one click on the header without any coding. In the bottom of the table is a navigator line to go step by step or jump direct to a record in the table.
The first impression of Quick Table is very good. It is nearly freeware, you must accept a small line, in the head of the table with a hint to the purchase, and a message box after the initialization. Otherwise the full functionality is available.



Cheers
Stefan

This post has been edited 1 times, last edit by "StefanSchnell" (Apr 26th 2009, 12:27pm)


Rate this thread
WoltLab Burning Board