Lets say I have a row that can store GUID.
But I don't want my grid to show the guid but something else .... how can it be done ?
help?
There are many ways to do that.
Can you make a list of your guids and display value for each of them? If that's the case, I think using a value list is the simplest approach.
var list = grid.DisplayLayout.ValueLists.Add();
list.ValueListItems.Add(value, name);
column.ValueList = list
But when I set the value into the cell with a GUID, and populate the valuelist, will the grid show the display name and not the value(guid) automatically?
Yes, a ValueList allows you to specify a DataValue and a DisplayText for each item. This is expressly for the purpose of storing a value and displaying more user-friendly text to the user.
My problem is that i have this column that is called Terminated By
A task can be terminated by an employee OR a crew for example. which are both GUID.
So how can I achieve to show the employee name or a crew name in that column ..... instead of the GUID. I also have another column that enable to specify by what type of operator has terminated the task, an employee or a crew, and then when going to the Terminated By column, it opens a combobox of a list of values of employee or crew depending on your choice.
Is this possible?
Just set ValueList = bindableValueList
It's in correct order. key first value second
Is the the appropriate way to use the BindableValueList :
_grid.DisplayLayout.Bands[ChildBandRowKey].Columns[columnKey].ValueList = bindableValueList.ValueListItems.ValueList;
It doesn't seem to work ... I prolly got it wrong
That's strange... Make sure you put the value and text in the correct order.
About showing employee or crew, get two lists of employees and crew and add all values to the value list. You can also use a BindableValueList so you can skip the manual values insert.
I tried using the valuelist. When the combo shows, it shows the name of the employee for example, but when the employee is selected, it shows the GUID in the grid .....