Hi,
I am working with a grid that uses two columns (Settings & Value). I currently have the Value column editable, but I would like to add a specific editor to each value depending on the type of setting I have. So far it looks like you can only set one type of editor for the entire column. I am curious if there is a workaround I am missing to be able to change the editor type per row.
Thank you
I am working with a grid that uses two columns (Settings & Value). I currently have the Value column editable, but I would like to add a specific editor to each value depending on the type of setting I have. So far it looks like you can only set one type of editor for the entire column. I am curious if there is a workaround I am missing to be able to change the editor type per row.
Thank you
So I think I did come up with a work around, but please still comment if there is a simpler way.
I found that if I use a custom-editor I can use v-if/v-else-if to change what the cell is based on information in that row.
In the example I linked below I set a condition on the Discontinued column that if the Units value was less then 20 then when editing the column it would be an input type, if it was over 20 then it would be a dropdown selection.
https://codesandbox.io/s/dropdown-vs-input-fsj8xe
Hi, Ken.
Thank you for the provided example. The approach that you shared is correct. If we want to have different editors in specific Grid editing scenarios, this can be achieved with a custom template. Inside the custom template, the logic that should be implemented should have a v-if/v-else-if structure.
The implementation that you shared is similar to what we would suggest as a solution.