We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Scriptmanger

Dear All

I have created a small sample Application to get more knowledge using Syncfusion. But I am still fighting with them :-)

So I created a standard empty webform asp.net page with masterpage.

In my master page I do have set the Scriptmanger.

When I now test the Page it looks pretty good design wise, but if I press the next page button it crashed.

If I set in the web.config file this

<add key="LoadEJResourcesFromAssembly" value="false" />

The page loads, next page is working well, but the design is not taken.

Here is my MasterPage:


<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="mainMaster.master.cs" Inherits="SYNC_Telephony.mainMaster" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Testing Syncfusion Grid</title>
    <asp:ContentPlaceHolder ID="head" runat="server">
        <link rel="stylesheet" runat="server" rel='nofollow' href="Content/master.css" type="text/css" />
    </asp:ContentPlaceHolder>
</head>
<body>
    
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server"> </asp:ScriptManager>
        <link rel="stylesheet" runat="server" rel='nofollow' href="Content/master.css" type="text/css" />
        <header>
            <asp:Panel runat="server" ID="pnl" CssClass="panel">
                <asp:Label ID="lbl" runat="server" Text="Testing Syncfusion Grid" CssClass="label" Font-Bold="True" Font-Size="XX-Large" Font-Strikeout="False"></asp:Label>
            </asp:Panel>
        </header>
        <div class="divMenuContainer" runat="server">
            <ul id="menu-bar">
                <li id="myhomeLink" runat="server"><a rel='nofollow' href="default.aspx">Home</a></li>
                <li id="myaboutLink" runat="server"><a rel='nofollow' href="about.aspx">About</a></li>
                <li id="mycontactLink" runat="server"><a rel='nofollow' href="contact.aspx">Contact</a></li>
            </ul>
        </div>
        <div class="pageContent">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>

        <footer>
               © 2016 by Martin for testig Syncfusion, v1.0
        </footer>
        <input type="hidden" id="hdnLoaded" name="hdnLoaded" runat="server" />
</form>
</body>
</html>


and this is my default page:


<%@ Page Title="" Language="C#" MasterPageFile="~/mainMaster.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="SYNC_Telephony._default" %>

<%@ Register Assembly="Syncfusion.EJ.Web, Version=14.2460.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %>
<%@ Register Assembly="Syncfusion.EJ, Version=14.2460.0.26, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89" Namespace="Syncfusion.JavaScript.Models" TagPrefix="ej" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <%--        <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script>
        <script type="text/javascript" src="http://cdn.syncfusion.com/js/assets/external/jquery-1.11.3.min.js"></script>
        <script type="text/javascript" src="http://cdn.syncfusion.com/js/assets/external/jquery.easing.1.3.min.js"></script>
        <script type="text/javascript" src="http://cdn.syncfusion.com/js/assets/external/jsrender.min.js"></script>

        <script type="text/javascript" src="http://cdn.syncfusion.com/js/web/ej.web.all-latest.min.js"></script>
        
        <link rel="stylesheet" runat="server" rel='nofollow' href="~/Content/ej/default-theme/ej.web.all.min.css" type="text/css" />
        <link rel="stylesheet" runat="server" rel='nofollow' href="~/Content/ej/default-theme/default-responsive.css" type="text/css" />--%>
    <link rel="stylesheet" runat="server" rel='nofollow' href="~/Content/master.css" type="text/css" />
    <link rel="stylesheet" runat="server" rel='nofollow' href="Content/ej/default-theme/ej.web.all.min.css" type="text/css" />
    <link rel="stylesheet" runat="server" rel='nofollow' href="~/Content/ej/default-theme/ej.widgets.all.min.css" type="text/css" />

    <script type="text/javascript" src="Scripts/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery.easing-1.3.min.js"></script>
    <script type="text/javascript" src="Scripts/jsrender.min.js"></script>
    <script type="text/javascript" src="Scripts/ej/ej.web.all.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery.globalize.min.js"></script>
    <script type="text/javascript" src="Scripts/bootstrap.min.js"></script>
    <script type="text/javascript" src="Scripts/jasondata.js"></script>
    <script type="text/javascript" src="Scripts/jquery.validate.min.js"></script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class="divGridsContainer">
        <div id="mainTable" class="divMainGrid" style="max-height:580px" >
            <ej:Grid ID="mainGrid" runat="server" AllowPaging="True"  CssClass="ej.widgets.all.min.css">
                <Columns>
                    <ej:Column Field="FIELD1"  HeaderText="FIELD1" IsPrimaryKey="True">
                    </ej:Column>
                    <ej:Column Field="FIELD2"  HeaderText="FIELD2" >
                    </ej:Column>
                    <ej:Column Field="FIELD3"  HeaderText="FIELD3" >
                    </ej:Column>
                    <ej:Column Field="FIELD4"  HeaderText="FIELD4" >
                    </ej:Column>
                    <ej:Column Field="FIELD5"  HeaderText="FIELD5" >
                    </ej:Column>
                    <ej:Column Field="FIELD6"  HeaderText="FIELD6" >
                    </ej:Column>
                    <ej:Column Field="FIELD7"  HeaderText="FIELD7">
                    </ej:Column>

                </Columns>
            </ej:Grid>
        </div>
    </div>
</asp:Content>



in code behind I anly set the datasource and bind the data.
    
here the error which is popping up

Unhandled exception at line 10, column 147003 in http://localhost:11358/ScriptResource.axd?d=KY8blRyLCkF6CHNnD2rBxD5esFvrdSRCtqfFYMMWwnJjVM5uMQQxq3pf44yg1WCeAXNzY65c_7y09c62iJJdPxAEk3O-_VcqzmBVUx-kJrWqemFbzJHKYxmvzO-UKXSrVah7Bk1d-jCyFLUh71X1vX4YNLDEnlH7UjmZaGViP9OFi13imx-ccq7Nt6rxBwJ6_wRPb2dsaMWKuxVflJI0Xg2&t=ffffffffd5dd53e5

0x800a138f - JavaScript runtime error: Invalid operand to 'in': Object expected


How can I fix this?




1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team July 18, 2016 10:48 AM UTC

Hi Martin, 

Thanks for contacting Syncfusion support. 

We checked your sample and we were unable to reproduce the mentioned error when we moved to the next page. In our sample, when theLoadEJResourcesFromAssembly and EJResources  appsettings keys is set to true in the web.config file, the necessary stylesheets were added to the grid  
 
If we set as true, the necessary stylesheets will be added to the header section of the current page dynamically to render the EJ components. So, we do not need to refer to the externalStyle sheet of the grid.   

Query 2 : “<add key="LoadEJResourcesFromAssembly" value="false" /> 
 
The page loads, next page is working well, but the design is not taken” 

In your code example, we found that you have referred both ej.web.all.min.css and ej.widget.all.min.css in the application.  
 
To apply styles to the grid control, you have to refer to ej.widgets.core.min.css and ej.theme.min.css files. If you use ej.widgets.all.min.css, then you don’t need to use ej.widgets.core.min.css and ej.theme.min.css because ej.widgets.all.min.css is a combination of these two. The ej.web.all.min.css is also a combination of ej.widgets.core.min.css and ej.theme.min.css files. So, remove anyone of the reference from your application.   

 
If you still face the same issue we need the following details. 
 
1. Provide the stackrace of an issue. 
 
2. Provide screenshot of the issue. 
 
3. Reproduce the issue in the attached sample. 
 
Refer to the Help document of getting started. 
 
 
Regards, 
Prasanna Kumar N.S.V 
 


Loader.
Live Chat Icon For mobile
Up arrow icon