How can represent binary data as svg in kendo grid MVC?

2 posts, 0 answers
  1. S.Ahmadi
    S.Ahmadi avatar
    3 posts
    Member since:
    Feb 2017

    Posted 16 Sep 2019 Link to this post

    I would like to represent binary data that save in myTable in sqlserver as svg in kendo grid MVC
  2. S.Ahmadi
    S.Ahmadi avatar
    3 posts
    Member since:
    Feb 2017

    Posted 16 Sep 2019 in reply to S.Ahmadi Link to this post

    I found it!

    And hope that it was Useful .

    Guys You should on kendo grid UI DataBound event write blow codes::

     $($("#YourGridName").data("kendoGrid").dataItems()).each(function (index, item) {
                         $("#YourGridName").data("kendoGrid").table.find("tr")[index].cells[numberofyourgridcell].childNodes[0].src= $("#YourGridName").data("kendoGrid").table.find("tr")[index].cells[numberofyourgridcell].childNodes[0].src.replace("data:image/svgxml;", "data:image/svg+xml;");
            });

    because when use svg image in your razor code Automatically your image src eliminate '+' between 'svg+xml'

Back to Top