Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
415
Use an Id as Value and a Name as Text
posted

Hi experts

I have a column which has an ultracombo as editorcomponent.
this ultracombos datasource points to some parent table (of my ultragrid's datasource).
In my example it points to a table which holds vehicles.
So the user can easily pick a vehicle and assign it to the current record.

the ultragrid's datasource is a datatable consisting of a sql-join-statement (also including this vehicle table)
My question is:
How can I have the vehicle's ID as value and the vehicle's Licence-Number as Text?

It's no problem when choosing from my ultracombo cause I can defined value- and displaymember.
But how can I do that with my join-datatable?

Hope it's clear what I mean

Parents
  • 469350
    Offline posted

    Hi,

    I'm afraid I do not understand your question.

    If you have an UltraCombo assigned as the EditorComponent or ValueList of a cell, then this will automatically translate the value in the cell (DataMember) to the display text (DisplayMember) and vice versa.

    If it's not working, then something is not set up correctly. Is the DataMember field on your list the same DataType as the column in the grid? Do the matching values exist on the list?

    BTW... using an UltraCombo as the EditorComponent of a column is not the most efficient way to provide a dropdown list in a cell. You might want to check out this KB article: HOWTO:What is the best way to place a DropDown list in a grid cell?

     

Reply Children