×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Listbox with hidden data

    Hello again,

    My application loads data with a unique index from a database and displays it in a listbox (CAknDoubleStyle2ListBox).
    Then I want to get the unique index (which must not be visible in the listbox) of the listbox's selected item. Generally I could do a mapping of the listbox index to the database unique index. But the problem is, that the ordering and the number of elements of the listbox can change after the data has been loaded from the database (e.g. due to an filtering operation). So, is it somehow possible to store hidden data with each listbox item?

    Regards,

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Listbox with hidden data

    The listbox itself is not really suitable for storing any additional invisible data. However SetItemTextArray method can make use of anything what implements MDesCArray. So you can provide your own solution which provides descriptors via the MDesCArray interface, but provides identifiers, numbers, or even complete database rows for you. Remember to SetOwnerShipType too.

  3. #3
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Re: Listbox with hidden data

    Thanks a lot!

Similar Threads

  1. SIP calls over Packet data
    By thefamilyman in forum VoIP
    Replies: 8
    Last Post: 2010-04-27, 06:12
  2. Replies: 4
    Last Post: 2008-12-29, 07:40
  3. Replies: 7
    Last Post: 2006-11-03, 01:52
  4. ListBox...Data not appearing..Please HELP!:)
    By flipflop82 in forum Symbian
    Replies: 2
    Last Post: 2005-03-04, 12:50
  5. Saving data from Settings Listbox
    By ashbhatia in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-11-20, 09:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×