Hello,
I think I have found a bug in the radgridview behavior:
My radgridview is structured by :
- A Tree with a self reference hierarchy.
- Child templates for some elements in the tree
My code looks like this :
radGridView.Relations.AddSelfReference(radGridView.MasterTemplate, "CategoryId", "ParentCategoryId");GridViewTemplate childTemplate = CreateChildTemplate();GridViewRelation relation = new GridViewRelation(this.radGridView.MasterTemplate, childTemplate);relation.ChildColumnNames.Add("T_RIGHT");radGridView.Relations.Add(relation);
For the CreateChildTemplate(), it looks like this :
GridViewTemplate childTemplate = new GridViewTemplate();childTemplate.AutoGenerateColumns = false;radGridView.Templates.Add(childTemplate);GridViewDecimalColumn decColumn = new GridViewDecimalColumn{ Name = "RightId", HeaderText = "Right Id", FieldName = "RGT_ID", IsVisible = false, MinWidth = 100};childTemplate.Columns.Add(decColumn);GridViewTextBoxColumn tbxColumn = new GridViewTextBoxColumn{ Name = "RightName", HeaderText = "Right Name", FieldName = "RGT_NAME", ReadOnly = true, MinWidth = 100};childTemplate.Columns.Add(tbxColumn);GridViewCheckBoxColumn chkxColumn = new GridViewCheckBoxColumn{ Name = "Checkbox", EnableHeaderCheckBox = true,
FieldName = "HasAccess",};childTemplate.Columns.Add(chkxColumn);
This tree works fine, as expected.
But when I try to implement the EnableHeaderCheckBox feature, I have an error
'System.NullReferenceException' dans Telerik.WinControls.GridView.dll
But the header checkbox works fine if I comment the line which enables the self referencing :
//radGridView.Relations.AddSelfReference(radGridView.MasterTemplate, "CategoryId", "ParentCategoryId");
Can you reproduce the problem ? What can I do with this behavior ?
Thanks in advance for your help.
I have "x" number of PageViewPage's on my PageView.
I need to be able to hide/show specific PageViewPage objects in code-behind. I am not seeing any way to do this. Basically I just want the "tab" for the page to go away and come back when I dictate.
I can't destroy and then re-show the pages however, because they were built using the designer many years ago and are very elaborate. The current solution and timing required for my project doesn't allow for going back and retooling the UI just so I could put the content of those items built in designer in to separate user controls. So, that idea is out.

Unfortunately I'm using an older version of the winforms controls, but just in case someone can help..
I'm validating in the property view, but I can't get an error message to show. I even tried to set Description until I worked out the error message issue, but that doesn't show either. (I have the help panel showing).
I have a delegate doing the property validation, which returns me an error string if invalid. The string is being returned correctly. See below for my code; I've only changed a name or two.
private void OnValidating(object sender, PropertyValidatingEventArgs e){ var item = e.Item as PropertyGridItem; if (item == null) return; if (_validateProperty != null) { var item = GetViewModelItem(sender); var error = ""; var valid = _validateProperty(item, e.Item.Name, e.NewValue as string, out error); if (!valid) { // TODO: error message not showing item.ErrorMessage = error; } e.Cancel = !valid; }}Hello I am trying to implement the Drag of a tree Node on a Panel (which incidentally is hosted in a usercontrol loaded on the same form as the treeView)
It seems that I manage to enable the drag on the tree node (see the code below) but I don't know how to handle the Drop on the panel; the panel allowdrop property is set to true but the Drop related events (DragOver, DragDrop, DragEnter) are not fired.
What am I doing wrong ? (tvDisplay s my TreeView)
I tried to follow the follwing exemple:
https://stackoverflow.com/questions/27014469/drag-telerik-radtreeview-node-to-textbox-in-c-sharp
----------------------------------------------------------------------------
Private Sub tvDisplay_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles tvDisplay.MouseMove
If myMouseDown AndAlso IsRealDrag(e.Location, clickedPoint) Then
Dim node As TreeNodeElement = TryCast((CType(sender, RadTreeView)).ElementTree.GetElementAtPoint(clickedPoint), TreeNodeElement)
If node IsNot Nothing Then
CType(sender, RadTreeView).DoDragDrop(node.Data, DragDropEffects.Copy Or DragDropEffects.Move)
End If
myMouseDown = False
End If
End Sub
Private Sub tvDisplay_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles tvDisplay.MouseDown
If e.Button = MouseButtons.Left Then
myMouseDown = True
clickedPoint = e.Location
End If
End Sub
Private Shared Function IsRealDrag(ByVal mousePosition As Point, ByVal initialMousePosition As Point) As Boolean
Return (Math.Abs(mousePosition.X - initialMousePosition.X) >= SystemInformation.DragSize.Width) OrElse (Math.Abs(mousePosition.Y - initialMousePosition.Y) >= SystemInformation.DragSize.Height)
End Function
Working in WinForms GridView and am trying to show the filter icon in the header itself and not in the search row.
I've done it before but cannot find the code on how I made that happen.

I have to print GridView content but there are some columns that are not needed to be in printed document (for example selection field). How can I make this right?
Hi all,
I am trying to drag and drop columns from grid1 to grid2 without any luck.
Found a example here on how to drag and drop rows :
http://www.telerik.com/help/winforms/gridview-rows-drag-and-drop.html
I searched for the same but then with columns instead of rows but i could not find any examples,so i am not sure if it even is possible to do it?
If it is possible does anyone know about a example or a tutorial on how to do this?
best regards,
H


Hello Telerik,
I have a gridview where I would like to implement two levels of grouping. The first level is the same, but the second level is conditional. When the condition is true, I would like to use the CustomGridGroupContentCellElement (as your sample), where is false, I would like to use a standard GridGroupContentCellElement.
I was able to get the initial display to work, but I am having issues with virtualization when the cell is being re-displayed during a collapse/expand and scrolling.
What I am doing now:
In then radgridview.CreateCell event handler;
if (e.CellType == typeof(GridGroupContentCellElement) && e.Row.RowInfo.Group.Level == 1) { if (e.Row.RowInfo.ChildRows[0].DataBoundItem != null) { var myobjectInfo = e.Row.RowInfo.ChildRows[0].DataBoundItem as MyObjectClass; if (myobjectInfo != null && myobjectInfo.TestCondition == true) e.CellType = typeof(CustomGridGroupContentCellElement); } }
When initially displaying the group, everything seems to work. But when expanding/collapsing or scrolling, the incorrect group cell is displayed at times.
I have looked at ViewCellFormatting and GroupSummaryEvaluate but don't know what I need to do in order to make sure the correct group cell is displayed.
Thanks

Hello Telerik Team,
I'm using Telerik UI For Winforms 2017 SP1.
When I was creating Progress Bar Column in radGridVew from Property Builder Dialog,
1. Property Builder Dialog close immediately
2. ProgressBar column was not created
3. Name of radGridView automatically Changed to "MasterTemplate"
4. And that name can't be changed back
How can I prevent this cause ?
