Expand button in hierarchical GridView overlaps text in GridViewHyperlinkGridColumn

6 posts, 0 answers
  1. Sergey
    Sergey avatar
    9 posts
    Member since:
    Sep 2018

    Posted 07 Sep 2018 Link to this post

    Hi,

    I have a problem: expand button in hierarchical GridView overlaps test in HyperlinkColumn. But TextBoxColumn has not this issue (please look at attachments)

    Is this a bug? Or maybe I missed some property? Could someone please help me? 

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3625 posts

    Posted 10 Sep 2018 Link to this post

    Hello, Sergey,          

    By default, the TextImageRelation property of the GridHyperlinkCellElement is set to Overlay. In order to display the image before the text, it is necessary to handle the CellFormatting event and specify the TextImageRelation to be ImageBeforeText:

    public RadForm1()
    {
        InitializeComponent();
     
        this.radGridView1.CellFormatting += radGridView1_CellFormatting;
        GridViewHyperlinkColumn column = new GridViewHyperlinkColumn("Hyperlink column");
        this.radGridView1.Columns.Add(column);
     
        this.radGridView1.Rows.Add("http://www.telerik.com");
        this.radGridView1.Rows.Add("http://www.microsoft.com");
        this.radGridView1.Rows.Add("http://www.google.com");
        this.radGridView1.Rows.Add("http://www.cnn.com");
        this.radGridView1.Rows.Add("http://www.bbc.com");
        this.radGridView1.Rows.Add("http://www.telerikwatch.com/");
        this.radGridView1.Rows.Add("http://www.wikipedia.com");
        this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    }
     
    private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
    {
        GridHyperlinkCellElement hyperlinkCell = e.CellElement as GridHyperlinkCellElement;
        if (hyperlinkCell != null)
        {
            hyperlinkCell.ContentElement.Image = Properties.Resources.bot;
            hyperlinkCell.ContentElement.ImageLayout = ImageLayout.Zoom;
            hyperlinkCell.ContentElement.TextImageRelation = TextImageRelation.ImageBeforeText;
        }
    }



    If you need any further assistance please don't hesitate to contact me.

    Regards,
    Dess
    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.
  3. Sergey
    Sergey avatar
    9 posts
    Member since:
    Sep 2018

    Posted 10 Sep 2018 Link to this post

    Thank you for your answer, but it didn't help.

    I guess the "expand" icons in hierarchical grid's cells is not image. I use workaround

    private void gridBuilds_CellFormatting(object sender, CellFormattingEventArgs e)
    {
        GridHyperlinkCellElement hyperlinkCell = e.CellElement as GridHyperlinkCellElement;
        if (hyperlinkCell != null) {
            hyperlinkCell.ContentElement.TextImageRelation = TextImageRelation.ImageBeforeText;
            int leftPadding = e.Row.HierarchyLevel * 15 + 15;
            hyperlinkCell.Padding = new Padding(leftPadding, 0,0,0);
        }
    }

     

    But if you know the real solution, please could you help me?

     

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3625 posts

    Posted 10 Sep 2018 Link to this post

    Hello, Sergey,          

    I was able to replicate the problem with the expander in a self-reference hierarchy and the hyperlink cells. I have logged it in our feedback portal. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

    I have also updated your Telerik points.

    Currently, the possible solution that I can suggest is to set the MasterTemplate.SelfReferenceExpanderColumn to a different column. 

    If you need any further assistance please don't hesitate to contact me.

    Regards,
    Dess
    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.
  5. Sergey
    Sergey avatar
    9 posts
    Member since:
    Sep 2018

    Posted 11 Sep 2018 Link to this post

    Hello, Dess

    Thank you for your help and logging feedback item for this. I hope it will be fixed soon. 

  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3625 posts

    Posted 12 Sep 2018 Link to this post

    Hello, Sergey,          

    I can't give you an exact time frame when a fix will be introduced. The more votes and item gathers, the higher its priority becomes. Make sure that you follow the item and thus you will be notified for any updates.

    I hope this information helps.

    Regards,
    Dess
    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