Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't add an 'extra' column to a grid
Message
From
29/04/1998 06:25:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/04/1998 04:41:24
Steve Camsell
Windmill Associates
Bath, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095610
Message ID:
00095631
Views:
25
>I feel like I should be able to solve this one, but I've been failing miserably for some time now, so if this problem is due to a temporary suspension of lateral thought, my apologies!
>
>I am trying to set up a grid that selectively displays records from a table (they are order lines). Along-side the information from the table, I want another column that contains a checkbox, so that the user can select which records they want to include.
>
>The problem seems to stem from the fact that there is no field in the table to represent this extra "Include Record" field. Can anyone suggest how I could go about this?
So many replies from experts as I can see and you should already have a good answer(s). I couldn't browse them all so directly post a sample that I use :
*Create a form with an editbox - edit1 and a commandbutton
*Command.click
cSQL = trim(thisform.edit1.value)
select .f. as lSelected, &cSQL into cursor myCursor
use dbf("myCursor") in 0 again alias tcSelector
use in "mycursor"
select tcSelector
thisform.addobject("mygrid","grid")
with thisform.mygrid
    .recordsourcetype = 1
    .recordsource = "tcSelector"
    .columncount=fcount("tcSelector")
    .columns(1).addobject("mycheckbox","checkbox")
    .columns(1).currentcontrol = "mycheckbox"
    .columns(1).mycheckbox.caption = ""
    .columns(1).header1.caption = "?"
    .columns(1).width = 20
    .columns(1).sparse = .f.
    .left = 1
    .top = 1
    .width = thisform.width - 2
    .visible = .t.
endwith
Now the idea I use is like this, user could browse and select in this grid and in lostfocus or via a command button you could operate on them.
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