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 ?
I have a grid bound to claimantBindingSource in which I have enabled row searching.
The search returns 3 matches, I move to the second match.
After executing the code below the bindingSource is moving to the first match which is a huge issue.
Is there any way to keep the position on the second match?
claimantDrv = this.claimantBindingSource.Current as DataRowView;
var Claimant = claimantDrv.Row as CRSDataSet.claimantRow;
fullname = "some name";
Claimant.name = fullname;