XML formatting within RadGrid

3 posts, 0 answers
  1. Chris
    Chris avatar
    13 posts
    Member since:
    Dec 2011

    Posted 30 Jul 2017 Link to this post


    I would like to be able to display formatted xml within a RadGrid using either google prettify or highlightjs.  I'm currently trying to display it within a NestedViewTemplate within a RadGrid.  Outside of the grid displays fine but it never works inside.  I'd also like to retain the skins if possible.

    Here's a simple example:

                              <pre class="prettyprint">&lt;samplexml&gt;&lt;tag value=&quot;1&quot;/&gt;&lt;/samplexml&gt;</pre>


  2. Eyup
    Eyup avatar
    4074 posts

    Posted 03 Aug 2017 Link to this post

    Hello Chris,

    For customization of layout you can check these options provided by RadGrid:

    1. GridTemplateColumn which will repeat the same template for every record:

    3. Grouping functionality:

    4. NestedViewTemplate:

    5. DetailItemTemplate:

    If the grid styles interfere with your inner custom styles, you can increase the CSS specificity of your own rules.

    Generally, the most suitable control for such custom layout is the RadListView:

    I hope this will prove helpful.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Chris
    Chris avatar
    13 posts
    Member since:
    Dec 2011

    Posted 09 Aug 2017 in reply to Eyup Link to this post

    Hi Eyup,

    Thanks for the info.  Most of the links look like they provide extending or overwriting current css where as I'm looking to disable it for certain elements within the grid. I'm not entirely sure how to do this as like I said the styling works perfectly outside of the grid but inside it seems to get overwritten by the grid style.  I'll keep testing and see if I can figure something out.


Back to Top