RadGrid Does Not Render Opening Table Tag in Visual Studio 2013

17 posts, 1 answers
  1. Jeremy
    Jeremy avatar
    2 posts
    Member since:
    Sep 2013

    Posted 24 Oct 2013 Link to this post

    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;  }
    }


  2. thelostleaf
    thelostleaf avatar
    22 posts
    Member since:
    Feb 2007

    Posted 25 Oct 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ABC
    ABC avatar
    20 posts
    Member since:
    Mar 2012

    Posted 26 Oct 2013 Link to this post

    See this link,

    http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-rendering-differently-in-different-machine-of-100-same-application.aspx
  5. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 29 Oct 2013 Link to this post

    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.
  6. Jeremy
    Jeremy avatar
    2 posts
    Member since:
    Sep 2013

    Posted 29 Oct 2013 Link to this post

    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
  7. thelostleaf
    thelostleaf avatar
    22 posts
    Member since:
    Feb 2007

    Posted 29 Oct 2013 Link to this post

    This solution worked for me ! Thanks !
    <add key="vs:EnableBrowserLink" value="false" /> Added to application in web.config.
  8. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 20 Dec 2013 Link to this post

    Same issue here.

    Adding <add key="vs:EnableBrowserLink" value="false" /> worked.
  9. Stephen2
    Stephen2 avatar
    1 posts
    Member since:
    Feb 2012

    Posted 08 Jan 2014 Link to this post

    Thanks everyone!  This fixed the issue of the RadGrid not coming out as a Table
  10. Amrit
    Amrit avatar
    4 posts
    Member since:
    May 2013

    Posted 28 Jan 2014 in reply to Jeremy Link to this post

    It works

    Thanx a lot
  11. Ying
    Ying avatar
    3 posts
    Member since:
    Sep 2011

    Posted 14 Mar 2014 in reply to Maria Ilieva Link to this post

    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?
  12. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 18 Mar 2014 Link to this post

    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.

     
  13. Amrit
    Amrit avatar
    4 posts
    Member since:
    May 2013

    Posted 19 Mar 2014 in reply to Maria Ilieva Link to this post

    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>
  14. Ying
    Ying avatar
    3 posts
    Member since:
    Sep 2011

    Posted 19 Mar 2014 in reply to Amrit Link to this post

    Adding <add key="vs:EnableBrowserLink" value="false" /> to the <AppSettings>  in the web.config file  is now working for me.

    Thank you,
  15. emre
    emre avatar
    1 posts
    Member since:
    Mar 2015

    Posted 10 Mar 2015 Link to this post

    It is awesome solution. It is working perfect. Thanks. 
  16. Nirav
    Nirav avatar
    2 posts
    Member since:
    Mar 2013

    Posted 11 Aug 2015 in reply to Jeremy Link to this post

    Thanks Jeremy for solution.

    It worked for me as well.

  17. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 Aug 2015 Link to this post

    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
  18. Shivam
    Shivam avatar
    5 posts
    Member since:
    Mar 2015

    Posted 21 Sep 2015 in reply to Jeremy Link to this post

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

     Thanks a lot. It worked.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017