How to set the ORDER BY clause using the LiveView .NET Client API
book
Article ID: KB0075188
calendar_today
Updated On:
Description
How can I set the ORDER BY clause for queries issued from my LiveView .NET Client API application?
Resolution
To specify the order for rows returned by the query, use a TopN query as follows:
QueryConfig qc = QueryConfig.CreateQueryConfig("Items");
qc.QueryType = QueryConfig.QueryTypes.CONTINUOUS;
qc.Predicate = "Column1 = 'AA'";
OrderDefinition orderDef = new OrderDefinition(); orderDef.Add(OrderDefinition.Direction.ASC, "Column2"); qc.SetTopN(orderDef, 100);
The above QueryConfig creates an OrderDefinition object, having a value of
ASC. That OrderDefinition is then used by the
SetTopN() method to set the order and limit (100).
Issue/Introduction
How to set the ORDER BY clause using the LiveView .NET Client API
Feedback
thumb_up
Yes
thumb_down
No