Oct 07, 2008, 5:50 AM
[CLOSED] Server side control in GridPanel???
Hi there,
Well impressed with v0.6.0!!!!!! I have been regularly checking and got all excited like a little school girl when I saw the version number at the top of the site!!!
Anyways, with new features come new questions and I wonder if I could be pointed in the right direction.
I have a table that lists textfiles and you should be able to view or download them.
In my original working table, for each column, I have two clickable images in seperate cells. The first would pop up a window with the contents of the textfile displayed and the second would let the user download the textfile to their desktop.
I have the popupwindow opening correctly using the renderer property, but I am not sure how to allow a user to download the file?
I have looked using AjaxEvents 'RowDblClick', but I don't think this will work due to it returning JavaScript not HTML??
So, is there a way to place a server side control in the GridPanel so that when clicked it fires this code on the server??
Well impressed with v0.6.0!!!!!! I have been regularly checking and got all excited like a little school girl when I saw the version number at the top of the site!!!
Anyways, with new features come new questions and I wonder if I could be pointed in the right direction.
I have a table that lists textfiles and you should be able to view or download them.
In my original working table, for each column, I have two clickable images in seperate cells. The first would pop up a window with the contents of the textfile displayed and the second would let the user download the textfile to their desktop.
I have the popupwindow opening correctly using the renderer property, but I am not sure how to allow a user to download the file?
I have looked using AjaxEvents 'RowDblClick', but I don't think this will work due to it returning JavaScript not HTML??
So, is there a way to place a server side control in the GridPanel so that when clicked it fires this code on the server??
byte[] binaryData = System.Text.ASCIIEncoding.UTF8.GetBytes(logFile);
Response.AddHeader("Content-disposition", "attachment; filename=" + filename);
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(binaryData);
Response.End();
Thanks for any help/direction