Using 2015.2, when I apply a filter to my grid using the following statement:
$("#myGgrid").igGridFiltering("filter", ([{ fieldName: "Producer", expr: selectedProducer, cond: "equals", logic: "AND" }]));
I get "infragistics.lob.js:91 Uncaught TypeError: Cannot read property 'toString' of undefined"
From infragistics.lob.js
_validateValue: function(val) {
var loweredItems, result; if (val === undefined) { result = false } else if (val === null) { if (this.options.allowNullValue) { result = val === this.options.nullValue ? true : false } else { result = false } } else if (this.options.isLimitedToListValues && this._dropDownList) { loweredItems = $.map(this.options.listItems, function(item) { return item.toString().toLowerCase() << -- I believe this is the offending line }); if ($.inArray(val.toString().toLowerCase(), loweredItems) !== -1) { result = true } else { this._sendNotification("warning", $.ig.Editor.locale.allowedValuesMsg); result = false } } else if (this.options.maxLength) { if (val.toString().length <= this.options.maxLength) { result = true } else { this._sendNotification("warning", $.ig.util.stringFormat($.ig.Editor.locale.maxLengthErrMsg, this.options.maxLength)); result = false } } else { result = true } return result }
If I revert and use 2015.1, all is well.
Is there some option that I need to be setting or setting differently on my grid that would be causing this?
Thanks!
What's the data type of the column that you are trying to filter? And did you explicitly define a type?
The column is defined as such:
{ headerText: "Producer", key: "Producer", dataType: "string" }
Solved.
Apparently at 2015.2, when defining a grid one must include a headerText value even if a column is hidden. Why this is the case I do not understand.
Example of what worked for 2015.1:
columns: [
{ key: "SampleID", hidden: true, dataType: "number" },
{ headerText: "Lab Number", key: "Lab Number", dataType: "string" }
]
Example of what is needed to avoid the error above in 2015.2:
columns: [ { headerText: "SampleID", key: "SampleID", hidden: true, dataType: "number" },
Hello Cecil,
Could you tell me which is the exact build version of 15.2 that you're using, since I tested similar scenario and wasn't able to replicate it. Even if the column is hidden or has no header text, the filtering works properly. Actually the filtering doesn't depend on this at all. Please take a look at the attached sample for your reference and feel free to modify it in order to replicate the issue, then send it back to me. If you have any further questions, do not hesitate to contact me.
Regards,
Tsanna
Infragistics.Web.ClientUI Combo 15.2.20152.1027 is what is loaded when using cdn-na.infragistics.com/igniteui/2015.2/nzpvn5c/1027/js/infragistics.lob.js
I agree I the filtering should not be dependent upon these filters. However, based on my testing and stepping through line by line debugging the situation, it clearly is the issue.
Did you have a chance to run the sample I attached in my previous response? Are you able to reproduce the error with it? Please give me your feedback based on my sample. If I can provide you with further assistance, feel free to contact me.
Sorry I got pulled in another direction yesterday. I will try it today and report back.
While that sample works, it is not a valid comparison to the filtering that I am doing.
I am setting the filter dynamically, not using the filters as they appear on the page in this example.
See my first post again.
I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 210666.
I've opened a private case for you with number: CAS-166972-K2P1N4 and have linked the development issue to it so that you'll be notified once the issue has been resolved. You can find the case by going to your account on our web site and then to the "Support activity" tab. You can view the status of the development issue connected to that case by selecting the "Development Issues" tab when viewing this case.
Please let me know if you need more information.