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

[Solved] Icons dissapear

1 Answer 11 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 1
Rob asked on 27 Mar 2011, 12:01 AM
Hi,

I have a partial view that contains a grid as follows:

@{Html.Telerik().Grid(Model)
        .Name("Test")
        .Columns(columns =>
        {
            columns.Bound(e => e.Test1).Width(80);
            columns.Bound(e => e.Test2).Width(50);
            columns.Bound(e => e.Test3).Width(50);
            columns.Template(@<text>
    <img src="../../images/information.png" alt="Information" style="cursor: pointer;"
        onclick="Display('@item.ID');" />
    </text>);
        })
        .DataBinding(dataBinding => dataBinding.Ajax().Select("Get", "Test"))
        .Pageable(paging => paging.PageSize(20))
        .Sortable()
        .Filterable()
        .Render();
}

The partial view is loaded via some jQuery and loads successfully. Unfortunately, when I try and sort or move to the next page, the icons in the last column dissapear. Could somebody tell me why this is happening?

Thanks,
Rob

1 Answer, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 27 Mar 2011, 04:52 PM

I corrected the original code by adding the following:

.ClientTemplate("<img src='./../Images/information.png' alt='Information' style='cursor: pointer;' onclick='Display(" + "<#= ID#>" +  ");'");
Tags
General Discussions
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Share this question
or