Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
open document on click of a cell in webgrid
posted

hi

i am using a webgrid and there i have to show the attachments regarding a particular ID

once i do put them through via datasource = datatable, i have to make my first cell to act as a link so that when the client clicks on it. the particular document is made to save or open.

 

ne ideas on how should i proceed???

  • 28464
    posted

    Hello,

    The best option in my opinion is by using TemplatedColunms and inside its CellTemplate use custom HTML to simulate this behaviour.

    For example:

    <CellTemaplte>

         <a href=""  .... />

    </CellTemplate>

    The href can point to the new window using target = "_blank", the parameter to the document can be in the HREF, e.g.

    <a href='{0}' target='_blank'> <img src='Images/folderstep2.GIF' style='border-style: none' /></a>