datasource.bind("change", function (e)
{
var element = datasource.get('90a11073-cbfe-4442-9330-9b94d83d53a2')
ok(element);
start();
});
How can I make the id in the schema case insenstive?
Thanks,
Pedro
1 Answer, 1 is accepted
0
Daniel
Telerik team
answered on 11 Feb 2013, 09:02 AM
Hello Pedro,
The get method compares the passed value directly and does not support using a case-insensitive search. You could implement this with a custom function which converts the id and the value to lower case:
datasource.bind("change", function (e)
{
var element = myGet(this.data(),'90a11073-cbfe-4442-9330-9b94d83d53a2');
ok(element);
start();
});
function myGet(data, value) {
var lower = value.toLowerCase();
for (var i = 0; i < data.length; i++) {
if (data[i].id.toLowerCase() == lower) {
return data[i];
}
}
}
Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!