Telerik Forums
UI for WinForms Forum
2 answers
1.2K+ views
Hello guys, I hope you are doing great.

I'm working on a WinForms project. One of the requirements is to drag files from the Desktop (or Windows Explorer) and drop them on a RadListView component. 

I set the AllowDrop and AllowDragDrop properties of the my listView object, and then I added the following events:

private void listView_DragEnter(object sender, DragEventArgs e)
{
    MessageBox.Show("DragEnter");
}
 
private void listView_DragDrop(object sender, DragEventArgs e)
{
    MessageBox.Show("DragDrop");
}

When I drag an item from the Desktop and enter the listView area, I get the "DragEnter" message. If I comment that code out, and then drop an item on the listView, I don't get the "DragDrop" message. 

My first question is: is it possible to achieve what I'm trying to do? And if it is possible, my second question is: what am I doing wrong?

I created a small test project to isolate the situation. The following is the complete code of the form class:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
 
namespace DragFromDesktop
{
    public partial class DragFromDesktopForm : Telerik.WinControls.UI.RadForm
    {
        public DragFromDesktopForm()
        {
            InitializeComponent();
        }
 
        private void DragFromDesktopForm_Load(object sender, EventArgs e)
        {
 
        }
 
        private void closeButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
        private void listView_DragEnter(object sender, DragEventArgs e)
        {
            //MessageBox.Show("DragEnter");
        }
 
        private void listView_DragDrop(object sender, DragEventArgs e)
        {
            MessageBox.Show("DragDrop");
        }
    }
}

I'm also attaching an example of how the form looks like. The big white square is the list view which I want to drop the items to.

Thanks in advance.

Best regards,

Alejandro
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Jan 2014
0 answers
72 views
I have a grid which has to be filtered programatically based on user entry. More than one column has to be filtered and each column may have more than 1 value to be filtered upon. Like say, Col1, Col2, Col7, Col8 has to be filtered on {1,4}, {1,38}, {78,65} & {1,0} respectively.

I have written the below code for this but looks like it filters only on the last set of values i.e. 4,38,65,0.

public static void SetGridFilterComposite(RadGridView gridView, Dictionary<string, List<int>> filterValues)
        {
            CompositeFilterDescriptor mainDescriptor = new CompositeFilterDescriptor();
            List<int> values = null;
 
            if (filterValues == null || filterValues.Count == 0) return;
 
            ClearGridFilterColumns(gridView);
 
            foreach (string column in filterValues.Keys)
            {
                CompositeFilterDescriptor columnDescriptor = new CompositeFilterDescriptor();
                if (gridView.Columns.Contains(column))
                {
                    values = filterValues[column];
                    FilterDescriptor filterDescriptor = new FilterDescriptor();
                    foreach (int value in values)
                    {
                        filterDescriptor.PropertyName = column;
                        filterDescriptor.Operator = FilterOperator.IsEqualTo;
                        filterDescriptor.Value = value;                       
                        columnDescriptor.FilterDescriptors.Add(filterDescriptor);
                    }
                    columnDescriptor.LogicalOperator = FilterLogicalOperator.Or;
                    mainDescriptor.FilterDescriptors.Add(columnDescriptor);
                }
            }
            mainDescriptor.LogicalOperator = FilterLogicalOperator.And;
            mainDescriptor.IsFilterEditor = true;
            gridView.FilterDescriptors.Add(mainDescriptor);
        }
Priyam
Top achievements
Rank 1
 asked on 16 Jan 2014
0 answers
71 views
avatar

Posted 9 hours ago (permalink)

hello, well I tested the demo of your product working with the listview control by the database
radlistview1.DataSource = dt
dt.Columns radlistview1.DisplayMember = (1). ToString


and post pictures in the ItemDataBound event to perfect the problem there is that I require key press selects the first item that Start with good lyrics that I hope your help thanks.


I tried this and nothing


For i = 0 To ViewVideos.Items.Count - 1
             If ViewVideos.Items (i). Text = "sauce" Then
                 ViewVideos.SelectedIndex = i

                 MsgBox (i)
             else
             End If
         Next

regards
John
Top achievements
Rank 1
 asked on 15 Jan 2014
8 answers
189 views
i am developing alarm system application using telerik 2012 q3  and i need your help in 2 questions :

1- how to convert database appointments  rows to appointments object without using rad scheduler
2- how can i select rows from appointment table before 1 hours from starting time(recurring appointments)

George
Telerik team
 answered on 15 Jan 2014
2 answers
179 views
I am working on a Winform program, and I can't believe there isn't an easier way to accomplish what I'm trying. 

Basically, I want to display an image that will always be 640x480.  Then, I want to have another control on top of it that is nothing more than a selection area that the user can change its size & location inside that 640x480 area, and it will report back its pixel size & x/y location. 

Short of drawing all of the lines by hand and adding grips by hand, I can't seem to find an easy way to do this.  Am I overlooking something? 
George
Telerik team
 answered on 15 Jan 2014
17 answers
283 views

Hi again... :-)

I have read the FAQ : Redistributing Telerik RadControls for WinForms

But have some doubts regarding it.

There are two approaches right ? One is to make a single EXE file by merging the assemblies and the EXE of the program. And the other is to merge the assemblies into a single assembly. Am I right ?

If I want to go for the second approach, from where should I get the ILMerge program ?

Thanks in advance..

PS: Special thanks to Richard Slade for the continuous help he had provided to me. Really appreciate it... :-)

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jan 2014
0 answers
177 views
Hello,

I need to place buttons in the ribbon bar and I only want to show any image and text. I do not want the border or background although it may be nice to have some border show when the mouse is over the button and clicked. I have read about the visual style builder but this is too complicated for me. Has anyone done this and have a DLL for this already? I would even pay someone to do this for me if possible.

Thanks,

Warren
Warren
Top achievements
Rank 1
 asked on 15 Jan 2014
8 answers
76 views
hi sir/madam

I have a problem with using Progressbarelement in gridview; according your trainmen we can add progressbar to cells by cellformatting but when I create a click event for the Progressbarelement ; it's not fire; also I check MousDown and ...

But when use radbuttonelement there is no problem and fire well;

private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
    {
    .
    .
    .
 
    RadProgressBarElement ProgressBarOne = new RadProgressBarElement();
    ProgressBarOne.Click += new EventHandler(ProgressBarOne_Click);
    .
    .
    }
    void ProgressBarOne_Click(object sender, EventArgs e)
    {
        MessageBox.Show("somethings");
    }


thank you for helping
Hadilionson
Top achievements
Rank 1
 answered on 14 Jan 2014
2 answers
144 views
When I set value using RadTrackBar.Value (using  either code or designer), visually it doesn't properly corresponds to what is has to.
 For example, Mininum = 20, Maximum = 200, Value = 100, but on the screen thumb is at the right end of control. Also, I think, that it is related - to set value higher than 100 - user has to move mouse out of control to the right side.
Controls version: 2013.3.1127.40

private void InitializeComponent()
{
  this.radTrackBar1 = new Telerik.WinControls.UI.RadTrackBar();
  ((System.ComponentModel.ISupportInitialize)(this.radTrackBar1)).BeginInit();
  this.SuspendLayout();
  //
  // radTrackBar1
  //
  this.radTrackBar1.Location = new System.Drawing.Point(13, 13);
  this.radTrackBar1.Maximum = 200F;
  this.radTrackBar1.Minimum = 20F;
  this.radTrackBar1.Name = "radTrackBar1";
  this.radTrackBar1.Size = new System.Drawing.Size(150, 17);
  this.radTrackBar1.TabIndex = 0;
  this.radTrackBar1.TickStyle = Telerik.WinControls.Enumerations.TickStyles.None;
  this.radTrackBar1.Value = 100F;
  //
  // Form1
  //
  this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  this.ClientSize = new System.Drawing.Size(292, 273);
  this.Controls.Add(this.radTrackBar1);
  this.Name = "Form1";
  this.Text = "Form1";
  ((System.ComponentModel.ISupportInitialize)(this.radTrackBar1)).EndInit();
  this.ResumeLayout(false);
  this.PerformLayout();
 
}
Den
Top achievements
Rank 1
 answered on 13 Jan 2014
1 answer
98 views
I'm really totally new to telerik.
I'm trying to create a form that has a grid view at the top section and at bottem an area for view, add, edit.
Each row in the grid shows basic information of some medical assessemnt. Clicking the row wil show all the information in the bottom area.
I can then edit or delete this information.
Clicking "add" will clear all the fields in the bottom section for inserting a new value.

Can anyone give me pointers on how to best approach with gridview. Example code will be a big help
Dimitar
Telerik team
 answered on 13 Jan 2014
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?