Declined
Last Updated: 03 Nov 2014 16:14 by ADMIN
ADMIN
Stefan
Created on: 23 Apr 2014 09:08
Category: GridView
Type: Bug Report
1
IMPROVE. RadGridView - when ShowChildViewCaptions is true, captions should be shown no matter if there are rows or not
This is not considered an issue, it is how RadGridView works. Here are more details:

In order for a GridDetailViewCellElement  to display a pageview instead of a single table element, either the template of the row holding it has to have more than one child template, or its ShowChildViewCaptions should be true.
Once there is a page view, the tabs in it will be visible at all times, except when some of the templates has no rows and AllowAddNewRow for it is false – if it does not have any rows and the user cannot add row, it is considered that there is no need from it.
If one needs to change the visibility of the tabs, this can be done in the ViewCellFormatting event:
private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
	GridDetailViewCellElement detailCell = e.CellElement as GridDetailViewCellElement;

	if (detailCell != null) {
		foreach (RadPageViewItem item in detailCell.PageViewElement.Items) {
			item.Visibility = Telerik.WinControls.ElementVisibility.Visible;
		}
	}
}
3 comments
ADMIN
Stefan
Posted on: 03 Nov 2014 16:14
Hi, you can use our free online code converter to convert between C# and VB.NET: http://converter.telerik.com/
Muscat
Posted on: 30 Oct 2014 11:19
Hi, can you please give me the VB.NET equivalent of the above code ?
ADMIN
Stefan
Posted on: 10 May 2014 07:52
This is not considered an issue, it is how RadGridView works. Here are more details:

In order for a GridDetailViewCellElement  to display a pageview instead of a single table element, either the template of the row holding it has to have more than one child template, or its ShowChildViewCaptions should be true.
Once there is a page view, the tabs in it will be visible at all times, except when some of the templates has no rows and AllowAddNewRow for it is false – if it does not have any rows and the user cannot add row, it is considered that there is no need from it.
If one needs to change the visibility of the tabs, this can be done in the ViewCellFormatting event:
private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
	GridDetailViewCellElement detailCell = e.CellElement as GridDetailViewCellElement;

	if (detailCell != null) {
		foreach (RadPageViewItem item in detailCell.PageViewElement.Items) {
			item.Visibility = Telerik.WinControls.ElementVisibility.Visible;
		}
	}
}