I have a radGrid control with that loads a binary image from a sqlDataSource in a GridBinaryImageColumn. It works fine, but I attached an onclick event with code behind, and use a javascript/jquery block code to zoom the image.
The problem is that the image is downloaded using the height/width properties, and when I resize the image, it is grainy, because it was set to resize mode fit. This is great because the image is small so the download is fast.
However, I am using a jQuery Light Box to display the image when it is clicked. Code works fine, except I am using the link from the cell.innerHTML to load the image in a lightbox, and this is the code:
var selectedCell = args.get_gridDataItem().get_cell("UploadPicture");
The src is something like src="Telerik.Web.UI.WebResource.axd?imgid=c7c37cd7e2874a99a04cfe282e769c95&type=rbi"
The image loads fine, however, if I try to resize the image using height/width attributes, the image becomes grainy because the original image that was downloaded was compressed to the settings in the grid control.
Question, is there an easy way to use the Telerik.Web.UI.WebResource.axd?imgid method to call a different size of the same image?
Or, is there an easier way to accomplish this?
Thanks in advance.
The problem is that the image is downloaded using the height/width properties, and when I resize the image, it is grainy, because it was set to resize mode fit. This is great because the image is small so the download is fast.
However, I am using a jQuery Light Box to display the image when it is clicked. Code works fine, except I am using the link from the cell.innerHTML to load the image in a lightbox, and this is the code:
var selectedCell = args.get_gridDataItem().get_cell("UploadPicture");
var image = selectedCell.innerHTML;
var myHref = $(image).attr('src');
The src is something like src="Telerik.Web.UI.WebResource.axd?imgid=c7c37cd7e2874a99a04cfe282e769c95&type=rbi"
The image loads fine, however, if I try to resize the image using height/width attributes, the image becomes grainy because the original image that was downloaded was compressed to the settings in the grid control.
Question, is there an easy way to use the Telerik.Web.UI.WebResource.axd?imgid method to call a different size of the same image?
Or, is there an easier way to accomplish this?
Thanks in advance.