[OPEN] [#459] Request for Hyperlink Column

Page 1 of 2 12 LastLast
  1. #1

    [OPEN] [#459] Request for Hyperlink Column

    I think it would be great if there's a built in hyperlink column for gridpanels. While it is easy to override the renderer to create a hyperlink per cell, I find that hacky because I dont want to assign an onclick to each hyperlink inside the renderer. The other alternative is to listen to grid cellclick event, check for column clicked, and override cell css to make it look like a hyperlink. But it would be nice to be able to wrap all that inside a hyperlink column that's very similar to your commandcolumn.
    Last edited by geoffrey.mcgill; Mar 27, 2014 at 3:47 PM.
  2. #2
    We will discuss. Thanks for the great suggestion.
    Geoffrey McGill
    Founder
  3. #3
    I've created a new Issue to track this request:

    https://github.com/extnet/Ext.NET/issues/459
    Geoffrey McGill
    Founder
  4. #4
    As quick solution I can suggest to use ImageCommandColumn

     <ext:ImageCommandColumn runat="server" Width="170">
                            <Commands>
                                <ext:ImageCommand CommandName="Delete" Text="<a href='#'>Delete</a>" Cls="hyper-command">
                                    <ToolTip Text="Delete" />
                                </ext:ImageCommand>
                                <ext:ImageCommand CommandName="Edit" Text="<a href='#'>Edit</a>" Cls="hyper-command">
                                    <ToolTip Text="Edit" />
                                </ext:ImageCommand>
                            </Commands>
    
    
    div.hyper-command span 
            {
                padding-left:5px !important;
            }
  5. #5
    Quote Originally Posted by jchau View Post
    I find that hacky because I dont want to assign an onclick to each hyperlink inside the renderer.
    You should not do that if you use an <a> HTML element. Do you not want to use <a> elements?

    I think a TemplateColumn might be a good option as well.
  6. #6
    Quote Originally Posted by Daniil View Post
    You should not do that if you use an <a> HTML element. Do you not want to use <a> elements?

    I think a TemplateColumn might be a good option as well.
    Yes, there fairly easy alternatives, but I think the original point is valid and a dedicated HyperlinkColumn would be very nice to have.
    Geoffrey McGill
    Founder
  7. #7
    Yes, I got it. I am rather thinking how to implement. I guess it should be similar to a LinkButton which renders an <a> HTML element.
  8. #8
    @jchau, I would like to elaborate on your requirement.

    Please clarify do you need exactly what Vladimir suggested?
    Quote Originally Posted by Vladimir View Post
    As quick solution I can suggest to use ImageCommandColumn

     <ext:ImageCommandColumn runat="server" Width="170">
                            <Commands>
                                <ext:ImageCommand CommandName="Delete" Text="<a href='#'>Delete</a>" Cls="hyper-command">
                                    <ToolTip Text="Delete" />
                                </ext:ImageCommand>
                                <ext:ImageCommand CommandName="Edit" Text="<a href='#'>Edit</a>" Cls="hyper-command">
                                    <ToolTip Text="Edit" />
                                </ext:ImageCommand>
                            </Commands>
    
    
    div.hyper-command span 
            {
                padding-left:5px !important;
            }
  9. #9
    Quote Originally Posted by Daniil View Post
    @jchau, I would like to elaborate on your requirement.

    Please clarify do you need exactly what Vladimir suggested?
    Yup, that would work great. I didn't use an <a> at first because I still have to assign a javascript function to run when you click on the link.
  10. #10
    Quote Originally Posted by jchau View Post
    I still have to assign a javascript function to run when you click on the link.
    It might be done via ImageCommandColumn's Command Listener. Does it suite your needs?
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: Feb 02, 2015, 5:32 AM
  2. [CLOSED] GridPanel column hyperlink tooltip
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Nov 07, 2012, 10:42 PM
  3. Replies: 0
    Last Post: May 21, 2012, 5:16 AM
  4. [CLOSED] Grid column hyperlink throws a JS error when clicked
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Feb 23, 2012, 1:52 PM
  5. Replies: 6
    Last Post: Feb 22, 2012, 5:43 PM

Posting Permissions