DropdownField with a Gridpanel revisited

  1. #1

    DropdownField with a Gridpanel revisited

    Ext.net.dll version: 1.2.0.21945
    Framework: 4.0
    Language: VB
    Context: Ext.NET Desktop

    http://forums.ext.net/showthread.php...-dropdown-list
    In the thread link above a question was asked: Can you provide more details why DropDownField is not an option for you?
    Keep in mind this is all within the Desktop/Desktop-Windows model.

    From our experience when a Gridpanel is placed inside the component collection of a DropDownField we run into some challenges.
    Follow this steps to reproduce the issue

    1. Click on Desktop icon to launch Desktop Window.
    2. Assume a Gridpanel with a self-contained Store already has data successfully bound. And this gridpanel is within the component collection of a DropdownField.
    3. Click on DropdownField. (Gridpanel shows properly with paging, sorting, rowselect (directevent) all working).
    4. Click a row on the Gridpanel so it's highlighted.
    5. Close Desktop Window.
    6. Click on a different Desktop Icon to open a different Desktop Window.
    7. Close Desktop Window that you just opened.
    8. Reopen the original Desktop Window

    At this point the DropdownField will no longer dropdown.
    We also did try to rebind the same data to the Store when the original Desktop Window was reactived via the Activate Event (DirectEvent), we didn't get any errors when trying to rebind, but the dropdownfield still wouldn't drop.

    There's also an issue where, if you select a row on the girdpanel which fires the DirectEvents RowSelect, afterwards we couldn't successfully unselect the row client-side or server-side. It's an issue because the next time you choose the dropdownfield and click the same row on the gridpanel the RowSelect will not fire because it's already selected.

    We did notice some older threads where you guys did discuss setting LazyMode="Instance", but there's some confusion about if subsequent controls within needed LazyMode="Config". We saw some discussion about IE7 and repaint. Not sure if that applies to later browsers or not.

    Anyway in short, a gridpanel in a dropdownfield does have some issues that we have not be able to resolve. Some help on this would be much appreciated.

    <script runat="server">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not IsPostBack And Not IsCallback Then
    BindStore1()
    End If
    End Sub

    Private Sub BindStore1()
    Try
    Dim anonList As New List(Of Object)

    For i As Int32 = 0 To 100
    anonList.Add(New With {.Id = i, .Last = "Last Name", .First = "First Name", .Number = "---", .Number2 = "---", .Type = "---", .Anon1 = "---", .Anon2 = "---"})
    Next
    Store2.DataSource = anonList
    Store2.DataBind()
    Catch ex As Exception
    Throw ex
    End Try
    End Sub

    </script>

    <ext:DropDownField ID="ddf1" runat="server" Mode="ValueText" LabelStyle="width:105px;"
    FieldLabel="Teachers" Width="250" AllowBlank="true">
    <Component>
    <ext:GridPanel ID="gpTeachers2" AutoDataBind="false" runat="server" Height="350"
    Width="500" LazyMode="Instance">
    <Store>
    <ext:Store ID="Store2" runat="server" AutoDataBind="false" AutoLoad="false"
    ShowWarningOnFailure="false">
    <Reader>
    <ext:JsonReader IDProperty="Id" AutoDataBind="false">
    <Fields>
    <ext:RecordField AllowBlank="false" Name="Id" Mapping="Id" Type="Int">
    </ext:RecordField>
    <ext:RecordField AllowBlank="true" Name="Last" Mapping="Last" Type="String">
    </ext:RecordField>
    <ext:RecordField AllowBlank="true" Name="First" Mapping="First" Type="String">
    </ext:RecordField>
    <ext:RecordField AllowBlank="true" Name="Number" Mapping="Number" Type="String">
    </ext:RecordField>
    <ext:RecordField AllowBlank="true" Name="Number2" Mapping="Number2"
    Type="String">
    </ext:RecordField>
    <ext:RecordField AllowBlank="true" Name="Type" Mapping="Type" Type="String">
    </ext:RecordField>
    <ext:RecordField AllowBlank="true" Name="Anon1" Mapping="Anon1" Type="String">
    </ext:RecordField>
    <ext:RecordField AllowBlank="true" Name="Anon2" Mapping="Anon2" Type="String">
    </ext:RecordField>
    </Fields>
    </ext:JsonReader>
    </Reader>
    <AutoLoadParams>
    <ext:Parameter Name="start" Value="0" Mode="Raw" />
    <ext:Parameter Name="limit" Value="13" Mode="Raw" />
    </AutoLoadParams>
    </ext:Store>
    </Store>
    <ColumnModel ID="ColumnModel4" runat="server">
    <Columns>
    <ext:Column ColumnID="Id" DataIndex="Id" Header="Id" Hidden="true">
    </ext:Column>
    <ext:Column ColumnID="Last" DataIndex="Last" Header="Last">
    </ext:Column>
    <ext:Column ColumnID="First" DataIndex="First" Header="First">
    </ext:Column>
    <ext:Column ColumnID="Number" DataIndex="Number" Header="Number">
    </ext:Column>
    <ext:Column ColumnID="Number2" DataIndex="Number2" Header="Number2">
    </ext:Column>
    <ext:Column ColumnID="Type" DataIndex="Type" Header="Type" Width="175">
    </ext:Column>
    </Columns>
    </ColumnModel>
    <SelectionModel>
    <ext:RowSelectionModel ID="RowSelectionModel3" runat="server" AutoDataBind="false"
    SingleSelect="true" MoveEditorOnEnter="false">
    <DirectEvents>
    <RowSelect OnEvent="rsm2_RowSelect" Delay="1" Buffer="250">
    <ExtraParams>
    <ext:Parameter Name="pId" Value="record.data.Id" Mode="Raw" Encode="true" />
    <ext:Parameter Name="pNumber" Value="record.data.Number" Mode="Raw" Encode="true" />
    <ext:Parameter Name="pLastName" Value="record.data.Last" Mode="Raw" Encode="true" />
    <ext:Parameter Name="pFirstName" Value="record.data.First" Mode="Raw" Encode="true" />
    </ExtraParams>
    </RowSelect>
    </DirectEvents>
    </ext:RowSelectionModel>
    </SelectionModel>
    <Plugins>
    <ext:GridFilters runat="server" ID="GridFilters2" Local="true">
    <Filters>
    <ext:StringFilter DataIndex="Last" />
    <ext:StringFilter DataIndex="First" />
    <ext:StringFilter DataIndex="Number" />
    <ext:StringFilter DataIndex="Number2" />
    <ext:StringFilter DataIndex="Type" />
    </Filters>
    </ext:GridFilters>
    </Plugins>
    <BottomBar>
    <ext:PagingToolbar ID="PagingToolbar2" runat="server" StoreID="Store2" PageSize="13">
    </ext:PagingToolbar>
    </BottomBar>
    </ext:GridPanel>
    </Component>
    </ext:DropDownField>
  2. #2

    Anybody?

    Anybody else experiencing this? Any ideas?
  3. #3

    Abandoned Idea

    Just wanted to update in case others run into this. We decided to abandon this approach. Instead we placed the gridpanel within a Borderlayout inside a panel. This approach allowed us to place the gridpanel in a separate region, in this case we placed in southern region.

Similar Threads

  1. Replies: 5
    Last Post: Nov 20, 2012, 1:48 PM
  2. [CLOSED] AutoLoad GridPanel strore inside a DropDownField
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Jul 27, 2012, 1:23 PM
  3. Replies: 1
    Last Post: Jun 29, 2012, 11:51 AM
  4. Filter on GridPanel collapses the Dropdownfield
    By huzzy143 in forum 1.x Help
    Replies: 0
    Last Post: Apr 10, 2012, 5:00 PM
  5. Replies: 1
    Last Post: Jun 23, 2011, 1:20 PM

Tags for this Thread

Posting Permissions