End-users have two options for getting the RadExpressionEditor shown at run time:
Showing RadExpressionEditor from RadGridView User Interface
End-users can open the editor by navigating to a built-in menu item
from the context menu of RadGridView. In order to enable this menu item, the developer
has to set the EnableExpressionEditor
property true. Please note that the expression column should
be an unbound column:
Copy[C#]
GridViewTextBoxColumn col = new GridViewTextBoxColumn();
col.Name = "expression";
col.HeaderText = "My Expression";
col.Width = 150;
col.EnableExpressionEditor = true;
this.radGridView1.Columns.Add(col);
Copy[VB.NET]
Dim col As GridViewTextBoxColumn = New GridViewTextBoxColumn()
col.Name = "expression"
col.HeaderText = "My Expression"
col.Width = 150
col.EnableExpressionEditor = True
Me.RadGridView1.Columns.Add(col)
Showing RadExpressionEditor on a custom user action
The developer can show RadExpressionEditor on a custom user action,
for example on a button click, without using the standard UI of RadGridView.
To do so, the developer should just call the static Show method of the RadExpressionEditorForm
class:
Copy[C#]
RadExpressionEditorForm.Show(this.radGridView1, this.radGridView1.Columns["expression"]);
Copy[VB.NET]
RadExpressionEditorForm.Show(Me.RadGridView1, Me.RadGridView1.Columns("expression"))