This is a migrated thread and some comments may be shown as answers.

Expand button in hierarchical GridView overlaps text in GridViewHyperlinkGridColumn

5 Answers 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 07 Sep 2018, 10:10 AM

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? 

 

5 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Sep 2018, 09:41 AM
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.
0
Sergey
Top achievements
Rank 1
answered on 10 Sep 2018, 10:35 AM

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?

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Sep 2018, 11:30 AM
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.
0
Sergey
Top achievements
Rank 1
answered on 11 Sep 2018, 07:44 PM

Hello, Dess

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 12 Sep 2018, 11:44 AM
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.
Tags
GridView
Asked by
Sergey
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Sergey
Top achievements
Rank 1
Share this question
or