Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Fixed Columns in Grids
Message
From
27/06/2001 11:15:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/06/2001 10:56:08
Arda Eden
Çaglayan Turk Musiki Vakfi
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00524027
Message ID:
00524182
Views:
19
This message has been marked as the solution to the initial question of the thread.
>yes Çetin abi. It will be readonly. Týpký header gibi. Do you remember your program you showed me ? In the "set appointmens" module, you used two grids working together syncronized. Alttaki gridin 1. colonu sabitti. Aslýnda alttaki gridi scroll yaptýðýnda üsttekinin nasýl onunla paralel hareket edebildiðini de anlatýrsan harika olur tabi ama. Þimdilik Sabit kolon bana yeter sanýrým. :))

Arda,
For others benefit going on in English :)
Then use Activex MSHFlexgrid. Sample :
#Define TESTDATALOC C:\ddrive\TEMP\testdata.DBC

oForm = createobject('myForm')
oForm.Show
Read events

Define CLASS myform AS form
  Top = 0
  Left = 0
  Height = 450
  Width = 250
  DoCreate = .T.
  Caption = "Form1"
  Name = "Form1"

  Add OBJECT hflex AS olecontrol WITH ;
    Top = 0, ;
    Left = 0, ;
    Height = 420, ;
    Width = 250, ;
    Name = "Hflex", ;
    OleClass = 'MSHierarchicalFlexGridLib.MSHFlexGrid'

  Procedure Init
  Local oRecordset,oConnection, strCn, strShp
*!* Conventional SQL joins
  strCn =	[Provider=MSDASQL.1;Persist Security Info=False;]+;
    [Extended Properties=]+;
    ["DSN=Visual FoxPro Database;UID=;]+;
    [SourceDB=TESTDATALOC;SourceType=DBC;]+;
    [Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"]
  strShp =	[select customer.cust_id, Company, orders.order_id, ]+;
    [ order_date, orditems.product_id  from customer ]+ ;
    [ inner join orders ]+;
    [ on customer.cust_id = orders.cust_id ]+;
    [  inner join orditems ]+;
    [ on orditems.order_id = orders.order_id ]
*!* Conventional SQL joins

  oRecordset = CreateObject("adodb.recordset")
  oConnection = CreateObject("adodb.connection")

  With oConnection
    .Provider = "MSDataShape"
    .ConnectionString = strCn
    .Open
  Endwith
  With oRecordset
    .ActiveConnection = oConnection
    .Source = strShp
    .Open
  Endwith
  With this.hflex
    .Datasource = oRecordset
    .FixedCols = 2 && Fixed columns on left  < -----------------------
    .ColWidth(0,0) = 0 && Hide unused column 0 leaving only cust_id fixed
    For ix = 1 to .Cols - 1
      .MergeCol(ix) = .t.  && Merge cols
    Endfor
    .Mergecells = 3
  Endwith
Endproc
  Procedure QueryUnLoad
  Clear events
Endproc
Enddefine
PS: Set appointments taki burasi icin cok karisik. Beni ziyaret et.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform