We are trying to filter numeric data, Grid filters on underlying data and not data format which is applied.
Do we have a method to filter data based on formatting applied and not datasource attached?
Thanks.
Hello Jeffrey,
Filtering, based on the applied formatting can be achieved by creating an unbound column, which gets its value with the formatting function by the formula option. For example:
{ headerText: "Product type", key: "ProductType", dataType: "number", formatter: formatterFunction},{ headerText: "Product type text", key: "ProductTypeText", dataType: "string", unbound: true, formula: function (data, grid) { return formatterFunction(data["ProductType"]); }}
If you are using the Updating feature on editRowEnding event the bound column (ProductType in this example) should get the unformatted value of the unbound column.
I have attached a working sample, demonstrating how this can be done.
Please feel free to contact me if you have further questions.
Regards,Ivaylo HubenovEntry-level developer
Thanks Ivaylo. will try this.
Please let me know how it went, when you try it and if you need further assistance.