QueryPanel class

Korzh.EasyQuery.WinForms.QueryPanel control - the main GUI control for query building.

public class Korzh.EasyQuery.WinForms.QueryPanel
    : XPanel

Package: Korzh.EasyQuery.WinForms (targets: net461, net5.0-windows7.0, netcoreapp3.1)

Assembly: Korzh.EasyQuery.WinForms.dll

Constructors

Name Type Description
QueryPanel() void Initializes a new instance of the Korzh.EasyQuery.WinForms.QueryPanel class.

Properties

Name Type Description
Active bool Gets or sets a value indicating whether this Korzh.EasyQuery.WinForms.QueryPanel is active.
ActiveRow ConditionRow Gets currently active row.
Appearance QueryPanel.QueryPanelViewOptions Gets the Korzh.EasyQuery.WinForms.QueryPanel.QueryPanelViewOptions object.
BoolValuesMenuList ValueItemList Gets the list of boolean values used in menus.
Model DataModel Gets the Korzh.EasyQuery.DataModel object
Query Query Gets or sets the Korzh.EasyQuery.Query object.
Rows ConditionRowList Gets list of condition rows.
ShowQueryParameters bool Gets or sets a value indicating whether query parameters will be shown as "extra" conditions to set the parameters' values.
SpecDateValuesMenuList ValueItemList Gets the list of special date values (like "Today") used in menus.
SpecTimeValuesMenuList ValueItemList Gets the list of special time values (like "Noon") used in menus.

Events

Name Type Description
ConditionRender ConditionRenderEventHandler This event is raised when the row is already rendered. It is used to change some UI of specific rows.
CreateValueElement CreateValueElementEventHandler This event allows to change value element type at run-time
ListRequest ListRequestEventHandler Occurs when the Korzh.EasyQuery.WinForms.QueryPanel object needs the content of some custom list
SubQueryDialogClosed EventHandler Occurs after sub query dialog has been closed.
SubQueryDialogOpening EventHandler Occurs before opening of sub query dialog.
ValueRequest ValueRequestEventHandler Occurs when there is a need to get value from user. For example when conditions has entity attribute with EasyData.CustomValueEditor object.

Methods

Name Type Description
AddSimpleCondition() void Adds the Korzh.EasyQuery.Condition.
ApplyFormats() void Applies the formats used in panel to all rows.
Arrange() void Arranges rows in the panel.
CheckDataModel() void Checks the Korzh.EasyQuery.DataModel object. Generates an exception if Korzh.EasyQuery.WinForms.QueryPanel.Model property has null value.
CheckQuery() void Checks the Korzh.EasyQuery.Query object. Generates an exception if Korzh.EasyQuery.WinForms.QueryPanel.Query property has null value.
CoreAddConditionGroup(Condition parent, int condIndex) void Core procedure that adds new Korzh.EasyQuery.WinForms.ConditionGroupRow object.
CoreAddSimpleCondition(Condition parent, int condIndex, EntityAttr attr) Condition Core procedure that adds new Korzh.EasyQuery.WinForms.SimpleConditionRow object.
CoreAddSimpleConditionThroughUI(string attrId) void Processes a click on "addition row".
CoreEndUpdate() void Performs necessary adjustments on update finish.
CreateAppearance() XPanel.XViewOptions Creates the appearance.
CreateRowList() XRowList Creates the row list.
Dispose(bool disposing) void Clean up any resources being used.
DoAction(object sender, string actionName, object data) void Handles Action event.
DoListRequest(ListXElement element, string listName) void Virtual method for filling the list of Korzh.EasyQuery.WinForms.ListXElement.
DoQueryConditionsChanged(object sender, ConditionsChangeEventArgs e) void Handles Query.ConditionsChanged event and refreshes Korzh.EasyQuery.WinForms.QueryPanel object accordingly.
MoveRowDown(int index) void Moves the row to one position down (taking into account the level of other rows).
MoveRowUp(int index) void Moves the row to one position up (taking into account the level of other rows).
OnCreateControl() void Raises the event.
OnKeyDown(KeyEventArgs e) void Raises the key down event.
OnListRequest(ListRequestEventArgs e) void Raises the ListRequest event.
OnRowAdded(XRow row) void Called when new row was added into the panel.
OnRowListChanged() void Called when list of rows was changed.
OnValueRequest(ValueRequestEventArgs e) void Raises the ValueRequest event.
RecreateRootRow() void Creates the root row.
ScrollAddRowIntoView() void Scrolls the "click here to add..." row into view.
SetRowsWidth(int width) void Sets the width of the rows.
ShiftRowLevel(int rowIndex, bool up) void Shifts the row level (taking into account the level of other rows)
UpdateModelInfo() void Updates all information based on data model information (such as list of entities).