Hi,
I see there have been some posts regarding this, but I cannot get this to work. I have a contacts table used to generate dropdown items. By default this uses FirstName. I want to create a template that uses a combination of FirstName + LastName when listing items for selection. None of the suggestions I have found appear to work for me.
Load event:
I have tried many combinations for the template, eg
${data.FirstName} ${data.LastName}
${((data as Contact).FirstName)} ${((data as Contact).LastName)}
But nothing is working. Anyone able to point me in the right direction here?
So if I understand you the right way to want to display a name in the dropdown like this "Firstname Lastname" ?
Can you provide a screenshot on how to contact object looks like?
What you can do is press the "Bind" button and paste this in
@($"{data.FirstName} {data.LastName}") and change the "data" to whatever your contact object is called.
Hi - thanks for your reply. Yes, I want to show "FirstName LastName" in the drop down when selecting the appropriate FK value. I have just found this post:
which actually works with the following syntax:
@(((dynamic)data).FirstName + " " + ((dynamic)data).LastName)
Cheers!