Jul 06, 2011, 3:20 PM
[CLOSED] MultiHeader filters get mixed up when column is moved
I this example I have three columns: String, Date, and Bool. I have two header rows with different filters for each column type. When I click on the Bool column and move it to the first position in the grid, other two columns display wrong filters.
I tried using <ext:HeaderColumn Target="#{id}" /> with hidden controls and got the same results. Is there something I can do to fix this or is it a bug?
I tried using <ext:HeaderColumn Target="#{id}" /> with hidden controls and got the same results. Is there something I can do to fix this or is it a bug?
<%@ Page Language="VB" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
stoData.DataSource = New Object() { _
New Object() {"One", CDate("01/01/2011"), False}, _
New Object() {"Two", CDate("02/02/2011"), True}, _
New Object() {"Three", CDate("03/03/2011"), False}
}
stoData.DataBind()
End Sub
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Move columns</title>
<link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Store ID="stoData" runat="server">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="String"></ext:RecordField>
<ext:RecordField Name="Date" Type="Date"></ext:RecordField>
<ext:RecordField Name="Bool" Type="Boolean"></ext:RecordField>
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
<div class="x-hidden">
</div>
<ext:GridPanel ID="gdMain" runat="server" StoreID="stoData" Width="600" Height="200">
<ColumnModel>
<Columns>
<ext:Column DataIndex="String" Header="String"></ext:Column>
<ext:DateColumn DataIndex="Date" Header="Date"></ext:DateColumn>
<ext:BooleanColumn DataIndex="Bool" Header="Bool"></ext:BooleanColumn>
</Columns>
</ColumnModel>
<View>
<ext:GridView ID="gvFilters" runat="server">
<HeaderRows>
<ext:HeaderRow>
<Columns>
<ext:HeaderColumn>
<Component>
<ext:ComboBox ID="opString" runat="server" SelectedIndex="0">
<Items>
<ext:ListItem Value="1" Text="String Equal" />
<ext:ListItem Value="2" Text="String Not Equal" />
<ext:ListItem Value="3" Text="String Starts With" />
<ext:ListItem Value="4" Text="String Contains" />
</Items>
</ext:ComboBox>
</Component>
</ext:HeaderColumn>
<ext:HeaderColumn>
<Component>
<ext:ComboBox ID="opDate" runat="server" SelectedIndex="0">
<Items>
<ext:ListItem Value="1" Text="Date Equal" />
<ext:ListItem Value="2" Text="Date Not Equal" />
<ext:ListItem Value="3" Text="Date Less Than" />
<ext:ListItem Value="4" Text="Date Greater Than" />
</Items>
</ext:ComboBox>
</Component>
</ext:HeaderColumn>
<ext:HeaderColumn>
<Component>
<ext:ComboBox ID="opBool" runat="server" SelectedIndex="0">
<Items>
<ext:ListItem Value="1" Text="Bool Equal" />
<ext:ListItem Value="2" Text="Bool Not Equal" />
</Items>
</ext:ComboBox>
</Component>
</ext:HeaderColumn>
</Columns>
</ext:HeaderRow>
<ext:HeaderRow>
<Columns>
<ext:HeaderColumn>
<Component>
<ext:TextField ID="fltrString" runat="server" EnableKeyEvents="true">
</ext:TextField>
</Component>
</ext:HeaderColumn>
<ext:HeaderColumn>
<Component>
<ext:DateField ID="fltrDate" runat="server" Editable="false">
</ext:DateField>
</Component>
</ext:HeaderColumn>
<ext:HeaderColumn>
<Component>
<ext:ComboBox ID="fltrBool" runat="server" Editable="true">
<Items>
<ext:ListItem Text="False" Value="0" />
<ext:ListItem Text="True" Value="1" />
</Items>
</ext:ComboBox>
</Component>
</ext:HeaderColumn>
</Columns>
</ext:HeaderRow>
</HeaderRows>
</ext:GridView>
</View>
</ext:GridPanel>
</body>
</html>
Last edited by Daniil; Jul 11, 2011 at 9:35 AM.
Reason: [CLOSED]