filterEditor DropDown default

I have a listgrid of users with an Active column.

My RestDataSource serializes the user objects active property as “true” or “false” in the XML Node. I would like it displayed as a valuemap of “Active”/“Inactive”. I would also like the default fetch operation to grab only the active.

The column looks like this:
{name: “Active”, title: “Active”, type: “string”,
valueMap:{“true”:“Active”, “false”:“Inactive”}},

I have autoFetchData for the grid set to false and I call this after it loads:

userAdminUserList.fetchData({Active:true});

What happens is that the drop down in the filterEditor gets 4 items:

Active
(Blank)
Active
Inactive

I don’t see how I can do this any different and still have it work. I can’t seem to set the field as boolean (even though it is). And if I do, I don’t know how to set the valuemap.

Of course this wont work: valueMap:{true:“Active”, false:“Inactive”}

Thanks

Paul

Hi Picasso,

Do set the field to boolean, and include the valueMap. If that’s not working, it probably has something to do with the data itself, so we’d need to see that.