0
votes

I have a data grid where some of the columns are are configured to use lookups. For all these columns the row filter option shows a select box with the datasource same as the lookup column.

The issue with this implementation is that, even if the data in my grid does not have a record with one of the values from the lookup options, the option is visible in the row filter data source. Hence, if the user selects this option, no records will be displayed in the grid.

I thought of two possible solutions as below:

  1. Filter the list on the row filter to show options based on the data grid records.
  2. Instead of select box, keep default text box in the row filter.

In the first solution, the data is as per the lookup datasource and cannot be filtered.

So I would like to implement the second solution but could not find any way to not display select box.

It would be of great help if I can get a solution to remove the select box in the lookup column which I feel should be configurable.

Also, other solutions are also welcome.

1
Can you create plunker? And add your codeyurzui
@yurzui you can use this. Here in the example, format column has that behaviorMustafa
I don't see example there. Can you reproduce it here plnkr.co/edit/0JLVeYkmUW5i19mItSBU?p=preview?yurzui

1 Answers

0
votes

Finally after posting a ticket with the devextreme development team, I found below solution:

onEditorPreparing: function(e) {
   if(e.parentType == "filterRow" && e.dataField == "YourField") 
          e.editorName = "dxTextBox"
    /// or 
       e.editorOptions.dataSource = // set custom data here
 }

Maybe some more documentation on their part would have helped.