Allows you to select an item with the specific value, or to read the currently selected item's value. You can also use the SelectedItem property to do the same. Additionally, EditValue allows you to specify a custom editor value.
The code sample below illustrates how to select a "Default" item in an in-place ComboBox editor when a user activates a cell.
C# |
private void gridView1_ShownEditor(object sender, EventArgs e)
{
GridView currentView = sender as GridView;
ComboBoxEdit cmbPO = currentView.ActiveEditor as ComboBoxEdit;
cmbPO.EditValue = "Default";
}
|
VB |
Private Sub gridView1_ShownEditor(ByVal sender As Object, ByVal e As EventArgs)
Dim currentView As GridView = TryCast(sender, GridView)
Dim cmbPO As ComboBoxEdit = TryCast(currentView.ActiveEditor, ComboBoxEdit)
cmbPO.EditValue = "Default"
End Sub
|