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

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

1 Answer 34 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
S.Ahmadi
Top achievements
Rank 1
S.Ahmadi asked on 16 Sep 2019, 08:58 AM
I would like to represent binary data that save in myTable in sqlserver as svg in kendo grid MVC

1 Answer, 1 is accepted

Sort by
0
S.Ahmadi
Top achievements
Rank 1
answered on 16 Sep 2019, 09:16 AM

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'

Tags
BinaryImage
Asked by
S.Ahmadi
Top achievements
Rank 1
Answers by
S.Ahmadi
Top achievements
Rank 1
Share this question
or