Class SearchPaneOptions
The SearchPaneOptions class provides a convenient method of specifying where Editor should get the list of options for SearchPanes 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.
SearchPanesOptions
instances are used with the Field.SearchPaneOptions()
method.
Inheritance
Namespace: DataTables
Assembly: DataTables-Editor-Server.dll
Syntax
public class SearchPaneOptions : object
Methods
| Improve this Doc View SourceFromEnum<T>(Boolean)
Set an enum that will be used to apply items to the SearchPanes select
Declaration
public SearchPaneOptions 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 |
---|---|
SearchPaneOptions | Self for chaining |
Type Parameters
Name | Description |
---|---|
T |
Label()
Get the column name(s) for the options label
Declaration
public IEnumerable<string> Label()
Returns
Type | Description |
---|---|
IEnumerable<System.String> | Column name(s) |
Label(IEnumerable<String>)
Set multiple column names for the SearchPaneOptions label
Declaration
public SearchPaneOptions Label(IEnumerable<string> label)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | label | Column names |
Returns
Type | Description |
---|---|
SearchPaneOptions | Self for chaining |
Label(String)
Set the column name for the SearchPaneOptions label
Declaration
public SearchPaneOptions Label(string label)
Parameters
Type | Name | Description |
---|---|---|
System.String | label | Column name |
Returns
Type | Description |
---|---|
SearchPaneOptions | Self for chaining |
LeftJoin(String, String, String, String)
Set a function that will be used to apply a leftJoin to the SearchPanes select
Declaration
public SearchPaneOptions 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 |
---|---|
SearchPaneOptions | Self for chaining |
Order()
Get the order by clause for the SearchPaneOptions
Declaration
public string Order()
Returns
Type | Description |
---|---|
System.String | Order by string |
Order(String)
Set the order by clause for the SearchPaneOptions
Declaration
public SearchPaneOptions Order(string order)
Parameters
Type | Name | Description |
---|---|---|
System.String | order | Order by SQL statement |
Returns
Type | Description |
---|---|
SearchPaneOptions | Self for chaining |
Render()
Get the rendering function
Declaration
public Func<string, string> Render()
Returns
Type | Description |
---|---|
Func<System.String, System.String> | Rendering function |
Render(Func<String, String>)
Set the rendering function for the SearchPaneOption labels
Declaration
public SearchPaneOptions 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 |
---|---|
SearchPaneOptions | Self for chaining |
Table()
Get the table configured to read the options from
Declaration
public string Table()
Returns
Type | Description |
---|---|
System.String | Table name |
Table(String)
Set the table to read the SearchPaneOptions from
Declaration
public SearchPaneOptions Table(string table)
Parameters
Type | Name | Description |
---|---|---|
System.String | table | Table name |
Returns
Type | Description |
---|---|
SearchPaneOptions | Self for chaining |
Value()
Get the value column name
Declaration
public string Value()
Returns
Type | Description |
---|---|
System.String | Value column name |
Value(String)
Set the value column name
Declaration
public SearchPaneOptions Value(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Column name |
Returns
Type | Description |
---|---|
SearchPaneOptions | Self for chaining |
Where()
Get the WHERE function used to apply conditions to the SearchPaneOptions select
Declaration
public Action<Query> Where()
Returns
Type | Description |
---|---|
Action<Query> | Function |
Where(Action<Query>)
Set a function that will be used to apply conditions to the SearchPaneOptions select
Declaration
public SearchPaneOptions Where(Action<Query> where)
Parameters
Type | Name | Description |
---|---|---|
Action<Query> | where | Function that will add conditions to the query |
Returns
Type | Description |
---|---|
SearchPaneOptions | Self for chaining |