I'm trying to populate rows from the database in a listbox control and I'm stuck at the point of assigning ItemTextArrays.
I have a couple of questions. I'd be really grateful if someone could help here.
1. I'm trying to populate around 500 items in the listbox all at once. I'm trying to read the entire items into a CDesc16ArrayFlat array.
My code is
CDesC16ArrayFlat* recordDescriptors = new( ELeave )CDesC16ArrayFlat(500);
Is my code correct?
Should I use an array with a predefined number of elements or should I use a dynamic one? It'd be great if someone can tell me the correct method for displaying large number of data elements in a listbox control.
2. The listBox accepts array of type MDesCArray, but one I have is of type CDesc16ArrayFlat. How do I convert it to this array?
3. How can I add an item to a listbox which has an Id associated with it, so that when the user selects that particular item, I have its Id with me, which I can use for further manipulations?
Please help me as this is extremely urgent. I'd really be grateful for your answers.
Thanks & regards,