This is a migrated thread and some comments may be shown as answers.

RadGrid Does Not Render Opening Table Tag in Visual Studio 2013

16 Answers 314 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 24 Oct 2013, 09:35 PM
Am having an issue using the RadGrid control in Visual Studio 2013's built in web server.  The table element is not be rendered.  The same page will render correctly when using Visual Studio 2012's built in web server.

Please advise.  Is this an issue with RadGrid or Visual Studio 2013?

Here is snip of the rendered HTML when site run in Visual Studio 2013.  Note the lack of an opening table tag. 

<div id="grdDemo" class="RadGrid RadGrid_Office2007">
 
Jones</td><td>Martha</td>
    </tr><tr class="rgAltRow" id="grdDemo_ctl00__1">
        <td>Noble</td><td>Donna</td>
    </tr><tr class="rgRow" id="grdDemo_ctl00__2">
        <td>Smith</td><td>Jon</td>
    </tr><tr class="rgAltRow" id="grdDemo_ctl00__3">
        <td>Tyler</td><td>Rose</td>
    </tr>
    </tbody>
 
</table><input id="grdDemo_ClientState" name="grdDemo_ClientState" type="hidden" />
    </div>

Here is the aspx markup

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server"><asp:ScriptManager ID="smDefault" runat="server"></asp:ScriptManager>
    <div>
        <telerik:RadGrid ID="grdDemo" runat="server" AutoGenerateColumns="false">
            <ClientSettings>      
                <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />           
            </ClientSettings>
            <MasterTableView ItemType="Contact">
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="Last Name">
                        <ItemTemplate><%#: Item.LastName %></ItemTemplate>
                    </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn HeaderText="First Name">
                        <ItemTemplate><%#: Item.FirstName %></ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>

Here is the C# code behind

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<Contact> contacts = new List<Contact>();
        contacts.Add(new Contact() { LastName = "Smith", FirstName = "Jon" });
        contacts.Add(new Contact() { LastName = "Tyler", FirstName = "Rose" });
        contacts.Add(new Contact() { LastName = "Jones", FirstName = "Martha" });
        contacts.Add(new Contact() { LastName = "Noble", FirstName = "Donna" });
 
        var data = contacts.OrderBy(c => c.LastName).ThenBy(c => c.FirstName);
 
        this.grdDemo.DataSource = data;
        this.grdDemo.DataBind();
    }
}


Here is the Contact class

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
/// <summary>
/// Summary description for Contact
/// </summary>
public class Contact
{
    public Contact()
    {
        //
        // TODO: Add constructor logic here
        //
    }
 
    public string FirstName { get; set; }
 
    public string LastName { get; set;  }
}


16 Answers, 1 is accepted

Sort by
0
thelostleaf
Top achievements
Rank 2
answered on 25 Oct 2013, 09:36 PM
Same thing happening here. VS Studio 2013, the VS IIS (when debugging ASP.net with the play button) causes grid to break but looks fine on IIS 8 Windows 2012 Server when publishing.

http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-layout-breaks-on-postback-in-q2-2013-release.aspx This article did not resolve for me.
0
ABC
Top achievements
Rank 1
answered on 26 Oct 2013, 12:44 PM
See this link,

http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-rendering-differently-in-different-machine-of-100-same-application.aspx
0
Accepted
Maria Ilieva
Telerik team
answered on 29 Oct 2013, 01:40 PM
Hello,


We are aware of this problem and the mentioned issue appears only in VS 2013 and in case you have debug set to "true" as compilation setting in the web.config file. We are actively working on the known problems related to VS 2013, IE11 and .NET 4.5.1. The fix for the presented issue is already included in the latest internal build which is already released. However please note that RadControls will support officially Visual Studio 2013 from Q3 2013 SP1 release.

Excuse us for any inconvenience this issue may lead.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Jeremy
Top achievements
Rank 1
answered on 29 Oct 2013, 02:19 PM
I was able to work around the issue in Visual Studio 2013 by adding the element below to my web.conifg appSettings section:

<add key="vs:EnableBrowserLink" value="false" />

See: http://weblogs.asp.net/imranbaloch/archive/2013/10/23/messy-html-and-js-errors-when-you-install-visual-studio-2013.aspx
0
thelostleaf
Top achievements
Rank 2
answered on 29 Oct 2013, 04:32 PM
This solution worked for me ! Thanks !
<add key="vs:EnableBrowserLink" value="false" /> Added to application in web.config.
0
msigman
Top achievements
Rank 2
answered on 20 Dec 2013, 02:46 PM
Same issue here.

Adding <add key="vs:EnableBrowserLink" value="false" /> worked.
0
Stephen2
Top achievements
Rank 2
answered on 08 Jan 2014, 08:30 PM
Thanks everyone!  This fixed the issue of the RadGrid not coming out as a Table
0
Amrit
Top achievements
Rank 1
answered on 28 Jan 2014, 10:45 AM
It works

Thanx a lot
0
Ying
Top achievements
Rank 1
answered on 14 Mar 2014, 08:18 PM
I have some ASP.NET AJAX web sites built with Visual Studio 2010 SP1 using Microsoft Framework 4.0 and RadControl Q3 2013 release. It runs fine when I use Visual Studio 2010, when I open the project from Visual Studio 2013 and use IE 11, the RadGrid control is rerender correctly, and I also get JavaScript runtime Errors.

How do I convert my web sites to use Visual Studio 2013 and the the latest version of RadControls?
0
Maria Ilieva
Telerik team
answered on 18 Mar 2014, 02:26 PM
Hi Ying,

In order to have the RadGrid control properly working in VS 2013 I would suggest you to upgrade to the latest version of the controls.
You can follow the instructions from this KB article in order to upgrade your controls to a newer version of the suite.


Regards,
Maria Ilieva
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
0
Amrit
Top achievements
Rank 1
answered on 19 Mar 2014, 10:39 AM
http://csharpocean.blogspot.com/2014/01/radgrid-does-not-render-opening-table.html


Add below key in your Web.Config file 

<AppSettings> 
<add key="vs:EnableBrowserLink" value="false" />
</AppSettings>
0
Ying
Top achievements
Rank 1
answered on 19 Mar 2014, 03:44 PM
Adding <add key="vs:EnableBrowserLink" value="false" /> to the <AppSettings>  in the web.config file  is now working for me.

Thank you,
0
emre
Top achievements
Rank 1
answered on 10 Mar 2015, 11:27 AM
It is awesome solution. It is working perfect. Thanks. 
0
Nirav
Top achievements
Rank 1
answered on 11 Aug 2015, 02:40 PM

Thanks Jeremy for solution.

It worked for me as well.

0
Maria Ilieva
Telerik team
answered on 13 Aug 2015, 08:33 AM
Hi,

Note that the latest version of the controls does not experience this problem and work properly in VS 2013 without the need of disabling the Browser Link feature.

Regards,
Maria Ilieva
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shivam
Top achievements
Rank 1
answered on 21 Sep 2015, 10:09 AM

<add key ="vs:EnableBrowserLink" value="false"/>

 Thanks a lot. It worked.

Tags
Grid
Asked by
Jeremy
Top achievements
Rank 1
Answers by
thelostleaf
Top achievements
Rank 2
ABC
Top achievements
Rank 1
Maria Ilieva
Telerik team
Jeremy
Top achievements
Rank 1
msigman
Top achievements
Rank 2
Stephen2
Top achievements
Rank 2
Amrit
Top achievements
Rank 1
Ying
Top achievements
Rank 1
emre
Top achievements
Rank 1
Nirav
Top achievements
Rank 1
Shivam
Top achievements
Rank 1
Share this question
or