Editor: Ordering Select Options

Editor: Ordering Select Options

kmboninkmbonin Posts: 59Questions: 16Answers: 0

I have a select box on my editor with taskNumbers and taskNames. This code in my controller:

Field(new Field("logan_dvprTasks.taskNumber")
                        .Options("logan_dvprTemplateTasks", "taskNumber", "taskName")
                        .Validator(Validation.DbValues()))

orders the list by taskName asc. I would like the list ordered by taskNumber asc instead. I tried

q=>q.Order("taskNumber") 

but that gave me an error with an empty where clause. How can I order the select list by taskNumber?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin
    Answer ✓

    With the current DataTables.dll I'm afraid that this isn't possible. You'd need to modify the library's code as it will always render using the rendered string.

    Editor 1.6, which I expect to be available in early December, will have this ability.

    Allan

This discussion has been closed.