[CLOSED] [#1373] [4.1.0] Grid - Column-renderer-method, HTML-tags are rendered as text.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] [#1373] [4.1.0] Grid - Column-renderer-method, HTML-tags are rendered as text.

    When using renderer on grid-columns the html-tags are output as text. The Sencha documentation says that the renderer method should return the HTML to be renderered, but now it is not working that way.

    @{
        var x = Html.X();
        var data = new List<object>{
            new
            {
                Name = "Lisa"
            },
    
            new
            {
                Name = "Bart"
            },
    
            new
            {
                Name = "Homer"
            },
    
            new
            {
                Name = "Marge"
            }
        };
    }
    
    @(
        x.Grid() 
            .Columns(
                x.Column()
                    .DataIndex("Name")
                    .Text("Name")
                    .Width(50)
                    .Flex(1)  
                    .Renderer(@"return '<a>'+value+'</a>'")                
            )
            .Store(x.Store()
                .AutoDataBind(true)
                .Fields(
                    x.ModelField().Name("Name")
                )
                .Data(data)
            )
    )
    Here's the output:
    Click image for larger version. 

Name:	Ext-Test-Grid-Renderer.JPG 
Views:	175 
Size:	12.7 KB 
ID:	24717
    Last edited by Daniil; Aug 17, 2016 at 7:25 PM.

Similar Threads

  1. Replies: 2
    Last Post: Jan 12, 2015, 1:43 PM
  2. Replies: 1
    Last Post: Dec 06, 2012, 3:27 PM
  3. Replies: 9
    Last Post: Oct 08, 2012, 7:49 AM
  4. [CLOSED] Templated grid not rendering html tags
    By SymSure in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 17, 2012, 8:50 PM
  5. [CLOSED] HtmlEditor text is rendered HTML encoded
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Feb 22, 2012, 3:04 PM

Posting Permissions