Welcome, Guest
  • Author Topic: Combobox + Dataset - select what data to show [Solved]  (Read 4997 times)

    lambda

    • Server what's that
    • *
    • Posts: 13
      • View Profile
    Hi All
    I need a little advice or tip ;)
    this is the question... my dataset gets data from php[sql]  through a xml schema.
    I need 2 values from this php, 1st is a numbered index, 2nd is a label.
    The combo shows all (with the setting i give to the dataset) => 2, Label.
    How I can "hide" the first? (but I need it to query the sql).

    Hope it's clear enough!

    Thank you so much
    lambda
    « Last Edit: 03/21/08, 05:33 by lambda »

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Combobox + Dataset - select wich data to show
    « Reply #1 on: 03/20/08, 10:46 »
    If you use automatic data binding you can avoid this, but probably after populating the combobox, you can remove the first element: myCombo.removeItemAt(0)

    Jorge

    lambda

    • Server what's that
    • *
    • Posts: 13
      • View Profile
    Re: Combobox + Dataset - select wich data to show
    « Reply #2 on: 03/20/08, 11:39 »
    Thank You Jorge
    but i can't get it!

    the dataset has a field name in schema-tab like "ID" wich is a number.
    The combo gets the values correctly but shows "obviously": ID,Label.
    I don't want to show the ID in the combo, but it is still needed for feed-back with the db.

    Thank you again

    lambda

    • Server what's that
    • *
    • Posts: 13
      • View Profile
    Hi
    if it interests the solution were:
    my_combo.labelField= "LABEL";

    thanks all.
    ;D