Expression editor enables you to write your own code or logic and assigns
it to the particular events of Controls or forms.
To open the Expression editor window, select a form and click on the Expression Button. Please note that each expression created is tightly associated with the selected form.
To Create the Expressions
To add a new expression click on the Add Button.
The Add button opens a window, where the user can choose to name the expression and decide whether the expression needs to return a Boolean value (True, False) as the return parameter. A new expression gets added to the Expression list.
To rename the Expression name Click on Edit button
To get a return value from the expression, check the checkbox Return True/False. By choosing this option, an expression has to return either true or false. A compilation error message will be generated if the given expression does not return any value when the user has explicitly checked in the checkbox.
Write the code on the right-side window, where you can use IntelliSense to aid in writing the program logic.
To check the compilation errors in the user-defined code, click on the Compile Expression Button. If any errors are found in the written code, the Compiler will list those errors. After solving the errors user gets this message.
To associate the expression on particular Control event, select the Set Control/Form Expression.
The Expression Association window is shown
All the Controls which are used in the particular form are displayed.
Select the Control from List of Controls list box.
When you select the Control from the list, all the Controls related events
are listed in the Control Events Listbox.
Select the events to be associated with the expression, by using the arrow buttons -
>> Button will choose all events of the given Control and
Button will remove the events from the Selected Events list box.
You can reorder the event’s sequence.
Select an event from Selected Event list.
Click on Update Association Button.
Select the Expressions from Choose Expression list.
To select multiple expressions at a time, hold the Ctrl (Control) key, then select the Expressions.
In addition to this, the user can also change the order of execution of expressions.
Associate Expression to events list displays all associated expressions to the particular Control Event.
Then click Save.
This option is used to add external references to your project.
To add an external reference, Click on the Add Reference Button. Select a *.dll file from system path.
The selected References file displays all the methods and functions which are listed in the Reference window.
To add an external reference, Click on the Add Reference
Button, Select *.dll file from system path and click Open.
Then you can use the DLL functions in Expressions that you build.
Click on Reports tab and Click Add Report to add reporting files to the Kushal project.
Selected files are automatically copied to project path\bin\Reports folder when output project is compiled.
Kushal contains a set of Classes with built-in functionality. Following are the few important classes with their functions.
These Functions or Methods are used to calculate the sum, count, max, min values in the Data Grid.
AggregateFunctionEvaluator.CalculateAvg (DataGrid Name, "Column_Name");
Description: Returns the average value of the column, resulting in positive or negative value.
AggregateFunctionEvaluator.CalculateCount (DataGrid Name, "Column_Name");
Description: Returns the Number of rows in the Data Grid, always resulting in a positive number.
AggregateFunctionEvaluator.CalculateMax (DataGrid Name, "Column_Name");
Description: Returns the Maximum value of the column. The result is a positive or negative value.
AggregateFunctionEvaluator.CalculateMin (DataGrid Name, "Column_Name");
Description: Returns the Minimum value of the column. The result is a positive or negative value.
AggregateFunctionEvaluator.CalculateSum (DataGrid Name, "Column_Name");
Description: Returns the total of the column, resulting in a positive or negative value.
AggregateFunctionEvaluator.Equals (object A, object B);
Description: Returns a Boolean value. It checks both objects and if they are equal, returns True, otherwise returns False.
AggregateFunctionEvaluator.CalculateFirstValue (DataGrid Name,
Description: Returns the First Value of the Data Grid column, resulting in a String.
Description: Returns the Last Value of the Data Grid column, resulting in a String.
These Functions or Methods are used to associate Controls to Grids and update the SQL Statement that fills the list of content displayed on the Controls. While most ControlAdapter functions contain an aspect of Control placed on a Form, not all functions are associated explicitly with Controls or SQL while serving to still update some aspect of the Form.
Description: It is used to associate all items selected in the Listbox Control
Description: It is used to calculate the column values in the Grid. It creates the delegate function to a particular Grid column and returns the result.
Description: Clears all the rows in the given Data Grid.
Description: Closes the form by associated Control.
ControlAdapter.Filter(dataGrid name, “dataGrid column name”)
Description: Filters the result of given Control (Data Grid, list box, Combo Box) based on the condition given.
ControlAdapter.GetColumnName(dataGrid name, “dataGrid coloumn name”)
Description: Returns the name of the Data Grid column.
Description: Loads Treeview Control and updates associated Grid and Controls.
Description: Moves selected tree node down and updates associated Grid and Controls.
Description: Moves selected tree node left and updates associated Grid and Controls.
Description: Moves selected tree node right and updates associated Grid and Controls.
Description: Moves selected tree node upwards and updates associated Grid and Controls
Description: Handles Grid column events and performs Grid column validations given.
Description: Handles few events of dropdown Control and process their values based on the conditions provided.
Description: Rearranges tree nodes based on the direction provided and also updates associated Grid and Controls.
Description: Resets Controls and set their values to a default value if provided.
Description: Save Treeview Control and updates associated Grid and Controls.
Description: Display the Form as a dialog box.
Description: Display the Image in a particular image box.
Description: Shows tooltip to the particular Control.
Description: Validates the given date from the input.
This is used to directly execute SQL statement to affect Database Table entries with no ties to any Controls.
Description: Execute the SQL query which does not return any value. It is used in cases where we are not interested in the output of Insert or Update queries.
Description: Get data in data table format for the given query.
Description: Returns set of values for the given query. Returns single set of values (null by default).