Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkboxes in grids
Message
From
14/09/1999 04:10:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00263961
Message ID:
00264346
Views:
39
>Susan,
>Not at all as you think :) You should see me asking about ASP in the past:)
>-Open designer
>-Rightclick your grid and select edit
>-Click on column where checkbox should be
>-Go to PEM sheet
>-Set currentcontrol to Checkbox using the combo
>-Rightclick DynamicCurrentControl and select "reset to default"
>
>For multiselectgrid, have you downloaded gridx.zip and checked the samples ?
>Cetin
>________________________________________________________________________________
>
>Cetin,
> Thanks so much for your help. I realized now that the method you taught me is for those using designers. I coded my program in raw code. So, how do I go about it now?


Susan,
OK so here is some sample code selecting fields from a table, adding a checkbox to it and displaying in a grid (I used testdata!employee, if necessary change samples path - VFP5 path here):
SELECT .f. as "Select",* ;
  from home()+"samples\data\employee" ;
  nofilter ;
  into cursor TmpCursor
USE dbf("TmpCursor") in 0 again alias myCursor
USE in "TmpCursor"

oForm = createobject("Form")
WITH oForm
  .Height = 400
  .Width  = 600
  .AddObject("CloseButton","myClose")
  WITH .CloseButton
    .Top = .Parent.Height - .Height - 5
    .Left = .Parent.Width - .Width - 5
    .visible = .t.
  ENDWITH
  .Addobject("myGrid","Grid")
  WITH .myGrid
    .Top = 1
    .Left = 1
    .Height = .parent.CloseButton.Top - 10
    .Width = .Parent.Width - 2
    .RecordsourceType = 1
    .Recordsource = "myCursor"
    WITH .Columns(1)
      .Addobject("myCheckBox","Checkbox")
      WITH .myCheckBox
        .Caption = ""
      ENDWITH
      .CurrentControl = "myCheckbox"
      .Sparse = .f.
    ENDWITH
    .Visible = .t.
  ENDWITH
  .Show
ENDWITH
READ events

DEFINE class myClose as Commandbutton
  Caption = "Close"
  PROCEDURE click
    thisform.release
    Clear events
  ENDPROC
ENDDEFINE
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