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
205
How to change the target attribute of a hyperlink column?
posted

I have a hyperlink column in a webgrid, and I'm changing the targeturl property of the cell in the InitializeRow event, but I'l like the hyperlink to open a new window (e.g. hl.target="_blank") but I can't find a way to do this as there is no "target" attribute of a cell.

Any ideas guys?

 Thanks,

Richard 

Parents
No Data
Reply
  • 1171
    posted
    You can set a target by adding @[target] before the url:

    cell.TargetUrl = "@[_blank]mypage.aspx";

    There's more information and more examples in the TargetUrl help topic:


    --
    Helen Emerson
    Infragistics Web Team

    richard_t wrote:
    > I have a hyperlink column in a webgrid, and I'm changing the targeturl
    > property of the cell in the InitializeRow event, but I'l like the
    > hyperlink to open a new window (e.g. hl.target="_blank") but I
    > can't find a way to do this as there is no "target" attribute of a cell.
    >
    > Any ideas guys?
    >
    > Thanks,
    >
    > Richard
Children