PDA

View Full Version : [CLOSED] BooleanFilter and BooleanColumn



cwolcott
Jun 11, 2012, 7:39 PM
I can't get the BooleanFilter to filter my BooleanColumn. When I select it to filter either "Yes" or "No", all the rows are still shown.



...
<ColumnModel runat="server">
<Columns>
<ext:BooleanColumn runat="server" Text="Active" DataIndex="IsActive" FalseText="No" TrueText="Yes" />
</Columns>
</ColumnModel>
...
<Features>
<ext:GridFilters>
<Filters>
<ext:BooleanFilter DataIndex="IsActive" NoText="No" YesText="Yes" />
</Filters>
</ext:GridFilters>
</Features>

Vladimir
Jun 11, 2012, 9:45 PM
Can you show IsActive ModelField?

cwolcott
Jun 12, 2012, 1:08 PM
Here is more detail:



<ext:GridPanel runat="server" ID="CfdbVersionGridPanel" Region="Center" >
<Bin>
<ext:Container runat="server"
<Content>
<asp:LinqDataSource ID="CfdbVersions_LDS" runat="server" ContextTypeName="CFV.CFVDataContext"
TableName="CfdbVersions" Select="new (CfdbVer, Order, Description, IsActive)" />
</Content>
</ext:Container>
</Bin>
<Store>
<ext:Store ID="CfdbVersions_Store" runat="server" DataSourceID="CfdbVersions_LDS">
<Model>
<ext:Model runat="server" IDProperty="CfdbVer">
<Fields>
<ext:ModelField Name="CfdbVer" Mapping="CfdbVer" Type="Int" />
<ext:ModelField Name="Order" Mapping="Order" Type="Int" />
<ext:ModelField Name="Description" Mapping="Description" Type="String" />
<ext:ModelField Name="IsActive" Mapping="IsActive" Type="Boolean" />
</Fields>
<ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="Order" Direction="DESC" />
</Sorters>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:NumberColumn runat="server" Text="CFDB Version" DataIndex="CfdbVer Format="00" Align="Center" hidden="true" />
<ext:Column runat="server" Text="Description" DataIndex="Description Hideable="false" />
<ext:BooleanColumn runat="server" Text="Active" DataIndex="IsActive" FalseText="No" TrueText="Yes" />
</Columns>
</ColumnModel>
...
<Features>
<ext:GridFilters>
<Filters>
<ext:BooleanFilter DataIndex="IsActive" NoText="No" YesText="Yes" />
</Filters>
</ext:GridFilters>
</Features>
...
</ext:GridPanel>


The database definition for the IsActive column is "bit not null". When I define the FalseText and TrueText for the BooleanColumn the values are shown as "No" and "Yes". If I take those attributes off the the values are "false" and "true".

Daniil
Jun 12, 2012, 4:15 PM
Hi Chris,

Thanks for the details.

We have checked our example.
http://examples2.ext.net/#/GridPanel/Plugins/GridFilters_Local/

The BooleanFilter appears to be functioned correctly.

Could you provide a full example to reproduce the problem?

cwolcott
Jun 12, 2012, 5:09 PM
I dug around a little more and added a numeric and string filter to the grid, only to find out that nothing is filtering. The filter icon is placed at the top of the column, but nothing is filtered and no errors are shown within the Chrome debugger.

I will need to think this through as to what might be causing the issue.