Munish Goyal
Munish Goyal

Reputation: 1409

How to get an editor for a column in AutoFilterRow (devexpress xtragridview)?

I am using XtraGrid control, with GridView. I have AutoFilterRow enabled.

For text columns, I do a LIKE search, and for a dropdown column, I assigned ColumnEdit = ReositoryItemComboBox.

It appears for this column in all the rows except the AutoFilterRow. How to get it in AutoFilterRow as well ?

Upvotes: 1

Views: 3067

Answers (1)

DmitryG
DmitryG

Reputation: 17848

To display the editor for the auto filer row, handle the CustomRowCellEdit event as shown below:

void gridView1_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e) {
    GridView view = sender as GridView;
    if(e.Column.FieldName == "COMM_TYPE" && view.IsFilterRow(e.RowHandle))
        e.RepositoryItem = repositoryItemComboBox1;
}

Upvotes: 1

Related Questions