HeaderButtonType Usage

6 posts, 0 answers
  1. Michael
    Michael avatar
    29 posts
    Member since:
    May 2011

    Posted 20 Jun 2012 Link to this post

    I have a GridHyperLinkColumn in my radgrid that is used to link to a SSRS report on a per-row basis - I would like to add a header link button that allows the users to execute a report that generates a report of all row items (1 record per-page).  To my mind setting the HeaderImageUrl and HeaderButtonType to LinkButton should result in a HyperLink control being rendered in the header cell however that is not the case - all I get is a Image control with the referenced image I set.  It appears that setting the HeaderButtonType has no effect so I'm wondering what column types is this property valid for as it does not seem to be valid for a GridHyperLinkColumn.  Obviously I could use a template column but I thought if I could use the properties provided (HeaderImageUrl/HeaderButtonType) life could be much simpler - that appears to not be the case.

    <telerik:GridHyperLinkColumn UniqueName="MemoColumn" ImageUrl="Content/Images/memo16.png" Target="_blank"
                                        HeaderImageUrl="Content/Images/memo16.png" HeaderButtonType="LinkButton">
                                        <ItemStyle HorizontalAlign="Center" Width="3%" Wrap="false" />
                                        <HeaderStyle HorizontalAlign="Center" Width="3%" />
                                    </telerik:GridHyperLinkColumn>
  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 25 Jun 2012 Link to this post

    Hello,

    Thank you for contacting us.

    The properties that you are using are inherited from the base class(GridColumn) and are not implemented in the child class(GridHyperLinkColumn). That is why you are not seeing visual or functional difference when you set them.

    Thank your for pointing that out, we will consider which properties should be implemented and which one should be hidden so it does not confuse our customers.

    You could use our PITS system to monitor the process:

    You can follow the PITS Issue by its ID: 11611
    Here you can find the PITS Issue: Public URL

    Let me know if I can be of any other help.
    Greetings,
    Andrey
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Michael
    Michael avatar
    29 posts
    Member since:
    May 2011

    Posted 25 Jun 2012 Link to this post

    Personally, I think they should be valid attributes on the RadGridHyperLink column given that the row column is designed to be a hyperlink - I see no reason why the column header control could not be generated based on the attribute values.  Regardless, I have come up with a work-around that does not involve using a template column - I set a onclick handler for the column header image (that is being generated) to open the report url in a new window.
  4. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 27 Jun 2012 Link to this post

    Hello,

    Most of the scenarios that our clients use does not involve hyperlink in the header, however, will consider implementing this feature as it could be useful in some rare cases.

    Regards,
    Andrey
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. DCoop
    DCoop avatar
    13 posts
    Member since:
    Sep 2006

    Posted 01 Aug 2018 in reply to Michael Link to this post

    exactly what I was looking for.
  6. Eyup
    Admin
    Eyup avatar
    3990 posts

    Posted 06 Aug 2018 Link to this post

    Hello Dan,

    There are also other ways you can achieve this requirement. One option is to use ItemCreated/ItemDataBound and access the header cell of the header item and add a new HyperLink or LinkButton to its Controls collection.

    Regards,
    Eyup
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top