[CLOSED] Error GridPanel Internet Explorer 8

  1. #1

    [CLOSED] Error GridPanel Internet Explorer 8

    Hi,
    I have a problem, I have a listing gridPanel information database with current browsers there is no problem, but in Internet Explorer v8, shows an error at the time of listing. Attached image of the error.


    Codigo Java Script.
    function ValidaListarVehiculos() {
        var txtPlaca = App.Content_Cuerpo_txtPlaca.getValue();
        var txtMarca = App.Content_Cuerpo_txtMarca.getValue();
        var vehiculo = {};
        vehiculo.IdUnidadNegocio = App.IdUnidadNegocio.getValue();
        vehiculo.Placa = txtPlaca;
        vehiculo.Marca = txtMarca;
        vehiculo.IdSede = App.Content_Cuerpo_cmbSede.getValue();;
        var input = { "request": vehiculo };
        $.support.cors = true;
        $.ajax({
            crossDomain: true,
            cache: false,
            async: true,
            type: 'POST',
            contentType: 'application/json;charset=utf-8',
            url: URLPrincipalWebService + "/REST/Moviles.svc/ListarVehiculo ",
            data: JSON.stringify(input),
            dataType: 'json',
            success: function (response, status, xhr) {
                var myData = JSON.stringify(response);
    
                var store = Ext.create('Ext.data.Store', {
                    fields: [
                        { name: 'IdMovil', type: 'int' },
                        { name: 'Marca', type: 'string' },
                        { name: 'Modelo', type: 'string' },
                        { name: 'Anio', type: 'int' },
                        { name: 'Placa', type: 'string' },
                        { name: 'KmMovil', type: 'int' },
                        { name: 'Estado', type: 'string' },
                    ],
                    data: myData
                });
    
                var grid = App.Content_Cuerpo_grdListVehiculos;
                grid.getStore().loadRecords(store.getRange(0, store.getCount()), { addRecords: false });
                grid.getView().refresh();
            },
            error: function (message) {
                var jsonFault = JSON.parse(message.responseText);
                Ext.Msg.alert('Error', '' + jsonFault.FaultMessage + '');
            },
            complete: function (jqXHR, status) { }
        });
    
    }
    Codigo ASPX

    <ext:GridPanel ID="grdListVehiculos"
                            runat="server"
                            DefaultAnchor="100%"
                            EnableColumnResize="False"
                            EnableColumnMove="False"
                            EnableColumnHide="False"
                            SortableColumns="False"
                            Frame="true">
                            <Store>
                                <ext:Store ID="StoreListVehiculos" runat="server" PageSize="10">
                                    <Model>
                                        <ext:Model ID="ModelListVehiculos" runat="server">
                                            <Fields>
                                                <ext:ModelField Name="IdMovil" Type="Int" />
                                                <ext:ModelField Name="Marca" Type="String" />
                                                <ext:ModelField Name="Modelo" Type="String" />
                                                <ext:ModelField Name="Anio" Type="Int" />
                                                <ext:ModelField Name="Placa" Type="String" />
                                                <ext:ModelField Name="KmMovil" Type="Int" />
                                                <ext:ModelField Name="Estado" Type="String" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <ColumnModel ID="ColumnModel3" runat="server">
                                <Columns>
                                    <ext:Column ID="colMarca"
                                        runat="server"
                                        Text="Marca"
                                        DataIndex="Marca"
                                        Align="Center"
                                        Width="80" />
                                    <ext:Column ID="colModelo"
                                        runat="server"
                                        Text="Modelo"
                                        DataIndex="Modelo"
                                        Align="Center"
                                        Width="80" />
                                    <ext:Column ID="ColAnio"
                                        runat="server"
                                        Text="A?o"
                                        DataIndex="Anio"
                                        Align="Center"
                                        Width="80" />
                                    <ext:Column ID="ColPlaca"
                                        runat="server"
                                        Text="Placa"
                                        DataIndex="Placa"
                                        Align="Center"
                                        Width="100" />
                                    <ext:Column ID="colKmRecorrido"
                                        runat="server"
                                        Text="Km Recorrido"
                                        DataIndex="KmMovil"
                                        Align="Center"
                                        Width="100" />
                                    <ext:Column ID="colEstado"
                                        runat="server"
                                        Text="Estado"
                                        DataIndex="Estado"
                                        Align="Center"
                                        Width="50" />
                            </ColumnModel>
                            <SelectionModel>
                                <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                            </SelectionModel>
    
                        </ext:GridPanel>
    Attached Thumbnails Snap01.jpg  
    Last edited by Daniil; Jul 23, 2014 at 12:17 PM. Reason: [CLOSED]
  2. #2
    Hi @developerpr,

    I am not sure, but this might be a bottleneck.
    var myData = JSON.stringify(response);
    Please check the content of the "myData" variable is the same or not in IE8 and other browsers.

    As for the error screenshot. I see there is the minified JavaScript. For development and debugging it is better to use non-minified JavaScript code.

    Please set this setting for a ResourceManager
    ScriptMode="Development"
    or globally in Web.config (in the <extnet> section)
    scriptMode="Development"
  3. #3
    I've solved today and actually, the problem was more than populate de gripanel. This was the solution:

    1. IE8 needs the KB976662 patch (http://support.microsoft.com/kb/976662)., This is for correct the method JSON.stringify.
    2. When I create a store object (the above code) I put a extra comma at the fields definition.
      I put "{ name: 'Estado', type: 'string' }," . It must be without the comma at the end (I didn't respect the correct syntax) .


    I hope that It can help you in this scenario.
  4. #4
    Thank you for sharing the solution.

Similar Threads

  1. Replies: 7
    Last Post: Jun 26, 2015, 11:39 AM
  2. Replies: 6
    Last Post: Apr 05, 2012, 4:23 PM
  3. [CLOSED] internet explorer cannot open the internet site
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 28, 2009, 10:30 AM
  4. Internet Explorer 8
    By Ben in forum Open Discussions
    Replies: 3
    Last Post: Feb 25, 2009, 12:38 AM
  5. Replies: 10
    Last Post: Dec 15, 2008, 3:13 PM

Posting Permissions