[CLOSED] MultiSelect initialized failed

  1. #1

    [CLOSED] MultiSelect initialized failed

    Here's my code:

    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<List<string>>" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <link href="/themes/shared.css" type="text/css" rel="stylesheet" />
        <link href="/themes/icons.css" type="text/css" rel="stylesheet" />
    </head>
    <body id="theBody">
        <ext:ResourceManager ID="theManager" runat="server" 
            IDMode="Inherit" 
            Theme="Default" 
            EnableViewState="false"
            DisableViewState="true"
            ShowWarningOnAjaxFailure="false" ScriptMode="Debug" />
        <ext:Panel runat="server" Height="400" Width="400" Layout="HBoxLayout">
            <TopBar>
                <ext:Toolbar runat="server">
                    <Items>
                        <ext:Button runat="server" Text="AAA">
                            <Listeners>
                                <Click Handler="testFunc();" />
                            </Listeners>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
            </TopBar>
            <Items>
                <ext:MultiSelect runat="server" Flex="1" DisplayField="field1" ValueField="field2">
                    <Store>
                        <ext:Store runat="server" ID="s" AutoLoad="false">
                            <Model>
                                <ext:Model runat="server">
                                    <Fields>
                                        <ext:ModelField Name="field1" />
                                        <ext:ModelField Name="field2" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                </ext:MultiSelect>
            </Items>
        </ext:Panel>
        <script language="javascript" type="text/javascript">
            var testFunc = function () {
                var store = <%= s.ClientID %>;
                store.load();
            }
        </script>
        <form runat="server" id="theForm" />
    </body>
    </html>
    <script runat="server">
        protected override void OnInit(EventArgs e)
        {
            List<object> data = new List<object>()
            {
                new { 
                    field1 = "A", field2 = "1"
                },
                new { 
                    field1 = "B", field2 = "2"
                }
            };
            s.DataSource = data;
            s.DataBind();
            
        }
    </script>
    I want it go like this: MultiSelect is initially empty; when click "AAA", ajax call to behind and return with data array. MutiSelect's hence populated.
    However the interface can not show reporting some failure on MultiSelect getting records value (error screenshot attached).
    Attached Thumbnails Click image for larger version. 

Name:	error.jpg 
Views:	76 
Size:	29.0 KB 
ID:	4337  
    Last edited by Daniil; Jun 07, 2012 at 2:21 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Thanks for the report. We will investigate a possible fix.

    For now please set up
    <CustomConfig>
        <ext:ConfigItem Name="useHiddenField" Value="false" Mode="Raw" />
    </CustomConfig>
    for the MultiSelect.
  3. #3
    The fix has been committed to SVN, revision #4076.

    Thanks again for the report.

Similar Threads

  1. Replies: 4
    Last Post: May 09, 2012, 9:24 PM
  2. Replies: 4
    Last Post: Feb 20, 2012, 11:14 AM
  3. [CLOSED] HiddenValue of ComboBox is not getting initialized correctly
    By joeRobee in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 12, 2010, 6:11 PM
  4. Replies: 0
    Last Post: Mar 09, 2010, 7:28 AM
  5. [CLOSED] Store has already been initialized
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 04, 2009, 2:07 PM

Posting Permissions