Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving listbox items back to table
Message
From
01/04/1998 11:32:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/04/1998 11:27:46
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00088653
Message ID:
00088711
Views:
38
Snip...
>Your original lstSource.dblclick was like this :
>
>THIS.Parent.lstSelected.AddItem(THIS.List(THIS.ListIndex))
>This.RemoveItem(THIS.ListIndex)
>THIS.Parent.Refresh
>
>Would be replaced with :
>
>with this.parent.lselected
>  .addlistitem(THIS.List(THIS.ListIndex),THIS.ListIndex,1)
>  .addlistitem(THIS.List(THIS.ListIndex,2),THIS.ListIndex,2)
>endwith
>This.RemoveItem(THIS.ListIndex)
>THIS.Parent.Refresh
>
>For this to work both lists would have two columns (code in second column). If you want to have only "code" in right list then just set boundcolumn in lstSource to code column and use your original syntax.
>Cetin
Ooops. To make sure you have unique ItemIDs instead of "this.listindex" use something like ".listcount+1" :
with this.parent.lselected
  .addlistitem(THIS.List(THIS.ListIndex),.listcount+1,1) 
  .addlistitem(THIS.List(THIS.ListIndex,2),.listcount,2) 
endwith
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