Top Row Filter Issue

If you think that something doesn't work in Aware IM post your message here
Post Reply
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Top Row Filter Issue

Post by customaware »

Aware IM 8.5 Build 2836

I have a Query that has a Yes/No column as Inline Edit and Filter Boxes on the Top Row.
The Yes/No Attribute uses the Default Labels.

Strangely, the filter box is displaying this......
TrueFalse.jpg
TrueFalse.jpg (26.31 KiB) Viewed 5810 times
I have never seen this before and looked everywhere I can think of to try and fix it to no avail.

Any Ideas would be appreciated
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Top Row Filter Issue

Post by Jaymer »

I reported this more than a year ago.
No fix.
Remove filter on the field.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Top Row Filter Issue

Post by Jaymer »

E44C34F9-18C4-43C7-9023-F0CD14A13202.jpeg
E44C34F9-18C4-43C7-9023-F0CD14A13202.jpeg (134.03 KiB) Viewed 5798 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Top Row Filter Issue

Post by aware_support »

This only happens if the Yes/No attribute is marked for inline editing. The workaround is to use the following initialization script:
(replace "AttributeName" with the name of the attribute you are filtering on (in two places below)

var c = null;
for (var i = 0; i < config.columns.length; ++ i)
{
    if (config.columns.field == "Exclude")
    {
          c = config.columns;
          break;
    }
}

if (c)
{
   if (! c.filterable)
      c.filterable = {};

   if (! c.filterable.cell)
     c.filterable.cell = {};

   c.filterable.cell.template = function (args) {
            args.element.kendoDropDownList({
              dataSource: [{ value: "Yes", text: "Yes" }, { value: "No", text: "No" }],
               dataTextField: "text",
              dataValueField: "value"
            });
   };  

   config.dataSource.schema.model.fields ["AttributeName"].parse = function (v) {
       if ($.isPlainObject (v) && v.value)
               return v.value;
        return v == "Yes" ? true : false;
     };
}
Aware IM Support Team
Post Reply