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
440
Hyperlink on a column header
posted

I want a hyperlink on the column header of a WebDataGrid. Does anybody know how this can be done?

Thanks
Nick 

Parents
No Data
Reply
  • 13438
    posted

    Hello Nick,

    Thank you for posting in our community. This is actually quite easy to achieve. You have to just use header template. This is a code demonstrating how to achieve the desired look of the grid:

     

    <ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="400px" AutoGenerateColumns="False">
    <Columns>
    <ig:BoundDataField Key="id" DataFieldName="id" Header-Text="id">
    <Header Text="id" TemplateId="Template1"></Header>
    </ig:BoundDataField>
    </Columns>
    <Templates>
    <ig:ItemTemplate ID="WebDataGrid1Template1" runat="server" TemplateID="Template1">
    <Template>
    <a href="http://es.infragistics.com/">Visit Infragistics</a>
    </Template>
    </ig:ItemTemplate>
    </Templates>
    </ig:WebDataGrid>

Children