Telerik Forums
UI for WinForms Forum
6 answers
143 views

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;
    }
}
Tino
Top achievements
Rank 1
 answered on 12 Dec 2017
6 answers
278 views

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

 

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 12 Dec 2017
2 answers
72 views

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.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2017
4 answers
491 views

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?

 

Krasimir
Top achievements
Rank 1
 answered on 12 Dec 2017
9 answers
223 views

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

 

 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2017
11 answers
1.8K+ views
Hi,

I use RadControls for WinForms Q2 2011.

I've set a column on my grid to ReadOnly for both EnterKeyMode and NewRowEnterKeyMode.

When navigating through cells with either Tab or Enter keys - it works fine and it jumps to the next editable cell. But, When navigating with Enter key on a new row through the read-only column - it stays on that cell and doesn't move on. I need to use Esc, arrows or mouse to release it.

Is it the right behavior? If so, is there some workaround for that?

Best Regards,

Boaz
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2017
2 answers
115 views

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

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2017
1 answer
92 views

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 ?

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Dec 2017
4 answers
401 views
How I can do to allow multiple checkbox checked in editable gridviewcheckboxcolumn. Now i can check only one column even if allow multi row selection is enabled
Hristo
Telerik team
 answered on 11 Dec 2017
9 answers
74 views

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;

 

 

 

 

Hristo
Telerik team
 answered on 11 Dec 2017
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?