Reputation: 23266
When constructing filter in Filter Editor, can i provide list of possible values ?
Example :
Can I have here ComboBox with possible values instead of TextEdit ?
Upvotes: 2
Views: 6104
Reputation: 11376
Yes, it is possible. You should handle the FilterEditorCreated event of the GridView as shown below:
private void gridView1_FilterEditorCreated(object sender, DevExpress.XtraGrid.Views.Base.FilterControlEventArgs e) {
DevExpress.XtraEditors.Repository.RepositoryItemComboBox combo = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
combo.Items.Add("Item 1");
combo.Items.Add("Item 2");
e.FilterControl.FilterColumns["ProductName"].SetColumnEditor(combo);
}
Upvotes: 4