Create Custom ExpressionEditor to GridView in C#.NET
The ExpressionEditor of GridView is a powerful editor used for create complex expressions. It is easy to access the predefined functions, operators, and constants as well as GridView fields. The Expression Builder of the editor allows the users easily look up and add components and fast enter accurate expressions as well. It is able to start the Expression editor from the context menu in a specific grid column, initialize it by using C# code and use it at design time. Moreover, the end users can simply use the ExpressionEditor
How to Create Custom Expression Functions in C#
The Kettic GridView has already contains amount of functions that have been predefined. However, when the users need additional functions, the GridView can meet their requirements too. The users are allowed to create a custom expression method and use the method in ExprssionEditor or as a value of the Expression property. This is achieved by creating a new ExpressionContext C# class to derive from the one in GridView component. The following is the C# code showing how to accomplish that.
When we implement the above method, we can set the new custom ExpressionContext C# class for the static Context property and then use the new expression method as below.
How to Create Custom Functions List in C#
To customize the UI elements available, localize functions descriptions and create custom functions, the Kettic ExpressionEditor provides the support of loading functions, operators and constants from an xml file. The source XML file describes the complete values available based on such an xml structure. The LoadXML method could help the users to load the xml file to their project with the C# code below.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls