![]() |
ItemData for Listbox |
Post Reply ![]() |
Author | |
tobi ![]() Senior Member ![]() ![]() Joined: 09 September 2004 Location: Germany Status: Offline Points: 451 |
![]() ![]() ![]() ![]() ![]() Posted: 13 April 2009 at 10:21am |
Hi,
in my c# application I want to add items to the CJ Listbox and then set something like Tag or ItemData to the corresponding database ID ... I think ItemData is the right thing, but how can I set it after or while adding a new item ? Thanks |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
You should use the NewIndex property for the ItemData index parameter immediately after you add the new item using the AddItem method. In VB6 your code would look like this:
You should be able to infer the C# code from that. (This code sets the ItemData property for each newly added item to the value in the counter "i", you wuold change that to be your database index #). |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
tobi ![]() Senior Member ![]() ![]() Joined: 09 September 2004 Location: Germany Status: Offline Points: 451 |
![]() ![]() ![]() ![]() ![]() |
In c# and with ListBox the ItemData method is not listed in context menu ???
|
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
I see the ItemData property in VB6 with version 13.0.0. What version of the suite controls are you using?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
.NET renames it to set_ItemData:
axListBox1.set_ItemData(...)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |