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

GridView are wrong to display RadHostItem

2 Answers 40 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 09 May 2017, 09:23 AM

I use RadGridView and have custom cell element.

I set row height = 300.

For custom cell element, i use RadHostItem to create childe
Ex: 

protected override void CreateChildElements()
       {
           base.CreateChildElements();
 
           var label = new Label();
           label.Text = "test";
           var layout = new TableLayoutPanel();
           layout.ApplyDefaultStyles("Master layout");
           layout.Dock = DockStyle.Fill;
           layout.ColumnCount = 1;
           layout.RowCount = 1;
           layout.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
           layout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
           layout.Controls.Add(label, 0, 0);
           layout.AutoScroll();
 
           var child = new RadHostItem(layout) { AutoSizeMode = RadAutoSizeMode.Auto};
           Children.Add(child);
       }

 

Result (see the picture in attachments)

Thanks and kind regards

Paul

 

2 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 10 May 2017, 09:14 AM

I change control from TableLayoutPanel to GridLayout, this issue was resolved.

Thanks and kind regards

Paul

0
Hristo
Telerik team
answered on 10 May 2017, 12:11 PM
Hello Paul,

Thank you for writing.

I am glad that you have found a suitable solution.

Please let me know if you need further assistance.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Paul
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or