This question is locked. New answers and comments are not allowed.
Hi everyone,
I'm using a RadGridView in a form to store some values that the user selects in the form.
So the process is something like that:
1. the user selects a value from a dropdownlist and types a text in a TextBlock
2. the user clicks on button Add
-> the values of the fields will be copied in a gridview (that the user can also see)
3. the user clicks on a save button
-> the gridview will be browsed and each row will be stored in the DB
Now my problem is the value that gets selected from a dropdownlist. This list displays string values but behind they are keys.
The user selects a string value "ABC" and sees that exact value in the gridview. But on save I need to save the corresponding key.
So my question is, how can I manage to store the Value and the Key in a cell but allowing the user to see only the Value.
I tried to do that with a KeyValuePair but then both are displeyed in the cell: [23, ABC].
I'm using a class of DisplayAttributes to define the columns of the gridview, so i don't do anything in the xaml file.
Thank you for any suggestion.
DA.
I'm using a RadGridView in a form to store some values that the user selects in the form.
So the process is something like that:
1. the user selects a value from a dropdownlist and types a text in a TextBlock
2. the user clicks on button Add
-> the values of the fields will be copied in a gridview (that the user can also see)
3. the user clicks on a save button
-> the gridview will be browsed and each row will be stored in the DB
Now my problem is the value that gets selected from a dropdownlist. This list displays string values but behind they are keys.
The user selects a string value "ABC" and sees that exact value in the gridview. But on save I need to save the corresponding key.
So my question is, how can I manage to store the Value and the Key in a cell but allowing the user to see only the Value.
I tried to do that with a KeyValuePair but then both are displeyed in the cell: [23, ABC].
I'm using a class of DisplayAttributes to define the columns of the gridview, so i don't do anything in the xaml file.
Thank you for any suggestion.
DA.