How to

Adding columns and conditions with code

Example of code for adding columns and conditions

How to add an extra condition to your query

Two possible ways of resolving this task

Building data model dynamically by DB meta-information

It's easier to fill your model right in the code directly from your database, using meta-information

Navigate through data model entities and attributes

A code snippet which demonstrates how to run through data model entities and attributes

User-friendly name for tables

Some tips for choosing right “entities” and their “attributes”

Navigate through query conditions

A code snippet which demonstrates how to run through all conditions in your query

Dynamically populate value lists by information from other conditions

Suppose we have a database with Customer entity which has Country and City attributes. For both these attributes we define the value editors which return the lists of available values (countries and cities correspondingly). Now let's imagine the user adds a condition with the Country attribute e.g. Hera the steps needed to implement such a functionality: Define a value editor for the City attribute as SQL LIST with Cities.@{{Customer.Country}} list name (here Customer.Country is the ID of the Country attribute in the Customer entity). Let's name it "CitesSqlValueList") and then in a value list resolver modify its SQL according the currently selected country and get the list of values using GetValueListAsync method of EasyQueryManager class: What's happening here.

Version 5.x

Contains the articles with solutions for different scenarios built on top of EasyQuery 5.0 (or higher)

Obsolete (for version 3.x or lower)

This section contains the tutorials for previous versions of EasyQuery.

How to setup SQL LIST value editor in WinForms app

Step-by-step instruction how to setup SQL LIST value editor.

How to make a field to field comparison

The instructions on how to add a condition which compares a field against another field instead of constant value.

Building data model dynamically by information from a DataTable

Example of how to build data model by certain information from DataTable

Create a query with sub-query by code

Example with code

Generating queries for 2 (or more) databases

Here you can find tricks for executing this task

Setup custom value editor — WinForms

Here you can find all steps you need to perfom

Replace "value" element in QueryPanel's conditions — WinForms

Here is a step-by-step description what you need to achieve this goal

Hide some entities and/or attributes

Here we explain how to implement different ways to limit the quantity of entities and attributes shown in Data Model

Add query builder page from our MVC sample project in your own app

This article described how to set up an advanced search page in your web-application using EqMvcDemoDB project as a template.

How to add a column with the same attribute as in newly added condition

A code snippet which demonstrates how to do this task

Processing custom value editors in EasyQuery JS (Obsolete)

Here you can find tips how to value editor setup and how to value editor widget

Add a new aggregate function

EasyQuery allows to add new aggregate functions for user's need. Here is detailed manual of how to do it with code example.

Using parameters in query conditions

This article explains how to work with parameterized conditions.

Build query by code on the client-side

Here you can find an example of JavaScript code with explanation how to add columns to a current query on client-side.

How to remove "Powered by..." link (full version only)

Full instruction of how to remove “Powered by EasyQuery” link

How to limit columns from duplication

How to limit columns from duplication in MVC project, so when you add a column that is already used in a report it won’t be added again.

Date/time values formatting

In this article, you can find instructions how to set up different types of date & time formats, with code examples.

Customizing common SQL clauses

This article is about settings for adding different options to the whole query (like DISTINCT, LIMIT, etc)

Customizing SQL query formats

Detailed instruction with various examples of how to operate with different query formats.

How to show descriptive texts in some column instead of numeric values

How to show some descriptive texts for some column in result set instead of actual numeric values stored in DB