DATA in GRID as link to other window

2 posts, 1 answers
  1. Pranouthi
    Pranouthi avatar
    13 posts
    Member since:
    Feb 2015

    Posted 31 Mar 2015 Link to this post

    How can i show data for one of the column as link(href) in the grid.

    <kendo:grid name="grid" selectable="multiple">
            <kendo:grid-pageable pageSizes="true" buttonCount="5" />
            <kendo:grid-sortable mode="multiple" allowUnsort="true" />
            <kendo:grid-columns>
                <kendo:grid-column title="num" field="rowNum" width="130px" />
                <kendo:grid-column title="Test Id" field="testId" width="130px" />            
            </kendo:grid-columns>
            <kendo:dataSource data="${List}" pageSize="15">
                <kendo:dataSource-schema>
                    <kendo:dataSource-schema-model>
                        <kendo:dataSource-schema-model-fields>
                            <kendo:dataSource-schema-model-field name="rowNum" type="string" />
                            <kendo:dataSource-schema-model-field name="testId" type="string" />                                            
                        </kendo:dataSource-schema-model-fields>
                    </kendo:dataSource-schema-model>
                </kendo:dataSource-schema>
            </kendo:dataSource>
        </kendo:grid>
        
        here i want testId to be displayed as link and when i click on the link i want to open a  new window for showing more details.
  2. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 02 Apr 2015 Link to this post

    Hello,

    You can use the "template" option of the column where Kendo UI template syntax can be used:

    <kendo:grid-column title="Test Id" field="testId" width="140" template="<a href='yourWebService/#=testId#' target='_blank'>Link</a>" />

    Regards,
    Vladimir Iliev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. UI for ASP.NET AJAX banner
Back to Top