Options.Label.Render
Options.Label.Render
Hi, Allan,
In the Editor Edit popup, I'm trying to make a dropdown to show a list of stores: the list has value from Store.Number, and I'd like to have the label as Store.Name + ", " + Store.City + ", " + Store.State.
var editor = new Editor(db, "Store", "Number")
.Model<Store>("Store")
.Field(new Field("StoreNumber")
.Options(new Options()
.Table("Store")
.Value("Number")
.Label(new[] { "Name", "City", "State" })
)
)
It seems there is a Render function I could use: .Label(....).Render(...). The Render takes Func<Dictionary<string, object>, string>. I'm wondering if you could show me an example. I'm using the .NET lib.
Thanks!
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This question has an accepted answers - jump to answer
Answers
There is an example for "Render" in here:
https://editor.datatables.net/manual/net/joins#Options
Thanks a lot! I was in the "neighborhood" of the doc but didn't jump in "joins"
For other readers' convenience, here is the code: