[CLOSED] Server side control in GridPanel???

  1. #1

    [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??

    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

  2. #2

    RE: [CLOSED] Server side control in GridPanel???

    Hi t0ny,

    Maybe I'm oversimplifying the problem, but could you not just make a link in one of the Columns and link directly to the file, or a Page that would package up the file and send back the Response as per your code sample?


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Server side control in GridPanel???

    Hi Geoffrey,

    Nope you have not oversimplified things linking to a page and packaging up the file and sending back the response working nicely!

    Thanks again

Similar Threads

  1. [CLOSED] Creating custom control on server side
    By AnulekhaK in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Feb 21, 2012, 10:15 AM
  2. Replies: 1
    Last Post: Nov 01, 2010, 9:00 PM
  3. COMPOSITE SERVER SIDE CONTROL(gridPanel)
    By marcmvc in forum 1.x Help
    Replies: 1
    Last Post: Apr 15, 2010, 4:45 PM
  4. Replies: 10
    Last Post: Dec 22, 2009, 10:22 AM
  5. Replies: 6
    Last Post: Sep 01, 2009, 1:06 PM

Posting Permissions