HiIf the dataTypes of grid columns are unknown at design time, can they be determined at runtime so that the appropriate column filters are made available on the grid?Thanks
Hi Petar,
The grid automatically infers the data types when it auto generates the columns, they are not set to string by default.
Angel
Hi ClassicFruitSalad,
Thank you for your reply.
Please feel free to contact me if any questions regarding this scenario arise.
Hi Petar
Thanks for that. I think we will take this approach…1. Store the iGrid’s column definitions in the DB i.e. headerText, Key, dataType and format 2. On iGrid Init programmatically build columns: attribute valuesHopefully that should be reasonably straight forward.Thanks
Hello ClassicFruitSalad,
Thank you for posting in the community.
When columns are autogenerated in the igGrid, their dataType seems to be set to "string" by default. In order to display the desired filters you would need to infer the desired type of the column in some other manner. Note that you should be able to change the dataType of a column if needed, for instance on the rendered stage:
rendered: function (evt, ui) { $('#grid1').igGrid("option", "columns")[3].dataType = "numeric"; }
Please feel free to contact me if you have any questions.