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
25
Grouping by a Column that contains a hyperlink
posted

NetAdvantage UltraWebGrid version 8.2.20082.2160

We have grids that display hyperlinks.  They are created in two different ways, depending on the situation.  The first creates the hyperlink as a button and creates source code that looks like this:

<C iDV="CRXU4508410">
    <![CDATA[<input type="button" style="width:100%;height:100%;" value="CRXU4508410"
             onclick="igtbl_colButtonClick(event,\'uwgResults\',null, igtbl_srcElement(event));" class="ig_7fddad5d_rcb1412" tabindex="-1" />]]>
</C>

The second creates an a href tag and looks like this:

<C>
    <![CDATA[<a href="BLOCKED SCRIPTvoid(0);" onClick="return CreateComment(\'792H000014NB0\',\'CRXU4508410\');">Add Comment</a>]]>
</C>

The columns created the first way are able to be grouped.  The columns created the second way are not.  You can drag the column header to the grouping bar, but they are still listed individually.

I notice two differences (other than the fact that one is a button and one is an href).  The first one has a value="..." and the first also has a property in the C tag.  I tried adding a value="..." to the second version, but that still didn't work.  It seems to me that the grouping is enabled by the iDV="..." property in the C tag. Is there any way to get the grouping to work on an a href tag?

]]>

Parents
No Data
Reply
  • 55
    Suggested Answer
    posted

    Hi, if you have flexibility on how the 2nd type of hyperlink created, you could have regular text in the cell that is styled to "look" like a hyperlink using CellStyle.CssClas, and then using the client side OnClick event to run the actual code.  We've completely moved to this way from having an actual hyperlink in the cell, because it solves sorting issues, etc.  This may fix your grouping issue. 

Children
No Data