Show / Hide Table of Contents

Class SearchBuilderOptions

The SearchBuilderOptions class provides a convenient method of specifying where Editor should get the list of options for SearchBuilder options list. This is normally from a table that is left joined to the main table being edited, and a list of the values available from the joined table is shown to the end user to let them select from.

SearchBuilderOptions instances are used with the Field.SearchBuilderOptions() method.

Inheritance
System.Object
SearchBuilderOptions
Namespace: DataTables
Assembly: DataTables-Editor-Server.dll
Syntax
public class SearchBuilderOptions : object

Methods

| Improve this Doc View Source

FromEnum<T>(Boolean)

Set an enum that will be used to apply items to the SearchBuilder select

Declaration
public SearchBuilderOptions FromEnum<T>(bool useValueAsKey = true)
Parameters
Type Name Description
System.Boolean useValueAsKey

Boolean to use the enum value as the key (default true)

Returns
Type Description
SearchBuilderOptions

Self for chaining

Type Parameters
Name Description
T
| Improve this Doc View Source

Label()

Get the column name(s) for the options label

Declaration
public IEnumerable<string> Label()
Returns
Type Description
IEnumerable<System.String>

Column name(s)

| Improve this Doc View Source

Label(IEnumerable<String>)

Set multiple column names for the SearchBuilderOptions label

Declaration
public SearchBuilderOptions Label(IEnumerable<string> label)
Parameters
Type Name Description
IEnumerable<System.String> label

Column names

Returns
Type Description
SearchBuilderOptions

Self for chaining

| Improve this Doc View Source

Label(String)

Set the column name for the SearchBuilderOptions label

Declaration
public SearchBuilderOptions Label(string label)
Parameters
Type Name Description
System.String label

Column name

Returns
Type Description
SearchBuilderOptions

Self for chaining

| Improve this Doc View Source

LeftJoin(String, String, String, String)

Set a function that will be used to apply a leftJoin to the SearchBuilder select

Declaration
public SearchBuilderOptions LeftJoin(string table, string field1, string op, string field2)
Parameters
Type Name Description
System.String table

String representing the table for the leftJoin

System.String field1

String representing the first Field for the leftJoin

System.String op

String representing the operatore for the leftJoin

System.String field2

String representing the second Field for the leftJoin

Returns
Type Description
SearchBuilderOptions

Self for chaining

| Improve this Doc View Source

Order()

Get the order by clause for the SearchBuilderOptions

Declaration
public string Order()
Returns
Type Description
System.String

Order by string

| Improve this Doc View Source

Order(String)

Set the order by clause for the SearchBuilderOptions

Declaration
public SearchBuilderOptions Order(string order)
Parameters
Type Name Description
System.String order

Order by SQL statement

Returns
Type Description
SearchBuilderOptions

Self for chaining

| Improve this Doc View Source

Render()

Get the rendering function

Declaration
public Func<string, string> Render()
Returns
Type Description
Func<System.String, System.String>

Rendering function

| Improve this Doc View Source

Render(Func<String, String>)

Set the rendering function for the SearchBuilderOption labels

Declaration
public SearchBuilderOptions Render(Func<string, string> renderer)
Parameters
Type Name Description
Func<System.String, System.String> renderer

Rendering function. Called once for each option

Returns
Type Description
SearchBuilderOptions

Self for chaining

| Improve this Doc View Source

Table()

Get the table configured to read the options from

Declaration
public string Table()
Returns
Type Description
System.String

Table name

| Improve this Doc View Source

Table(String)

Set the table to read the SearchBuilderOptions from

Declaration
public SearchBuilderOptions Table(string table)
Parameters
Type Name Description
System.String table

Table name

Returns
Type Description
SearchBuilderOptions

Self for chaining

| Improve this Doc View Source

Value()

Get the value column name

Declaration
public string Value()
Returns
Type Description
System.String

Value column name

| Improve this Doc View Source

Value(String)

Set the value column name

Declaration
public SearchBuilderOptions Value(string value)
Parameters
Type Name Description
System.String value

Column name

Returns
Type Description
SearchBuilderOptions

Self for chaining

| Improve this Doc View Source

Where()

Get the WHERE function used to apply conditions to the SearchBuilderOptions select

Declaration
public Action<Query> Where()
Returns
Type Description
Action<Query>

Function

| Improve this Doc View Source

Where(Action<Query>)

Set a function that will be used to apply conditions to the SearchBuilderOptions select

Declaration
public SearchBuilderOptions Where(Action<Query> where)
Parameters
Type Name Description
Action<Query> where

Function that will add conditions to the query

Returns
Type Description
SearchBuilderOptions

Self for chaining

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX