Telerik Forums
UI for WinForms Forum
1 answer
1.0K+ views

Hi,

How can i make application responsive UI ? with gridview i can make it with dock. But with textbox form data. Which approach for it ? 

Thanks.

Dimitar
Telerik team
 answered on 14 Jul 2017
2 answers
135 views

Hi ,

I am working with Treeview, i want to add columns behind the node to select. But i found out it does not support Treeview multi columns. and i found the solution RadGridView self-referencing. But my problem now is i want to have the behavior add children look like in Treeview. How can i do with RadGridView self-referencing ?

 

Thanks.

Bao
Top achievements
Rank 1
 answered on 14 Jul 2017
4 answers
205 views

Hi,

 

I'm using ItemDrag event to drag&drop items from a RadTreeView to another control.

When a drag an item from the RadTreeView, the ItemDrag event is raised multiple times (While item moving) and the item is dropped multiple times on the control.

The same code with System.Windows.Forms works fine.

Is there a solution to achieve the same result as System.Windows.Forms ?

 

Here is my code of a test project which compares Telerik et System.Windows.Forms:

        #region Telerik Drag&Drop

        private void radTreeView1_ItemDrag(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine(String.Format("radTreeView1_ItemDrag : {0}", e.Node.Name));
            DoDragDrop(e.Node, DragDropEffects.Move);
        }

        private void radTreeView2_DragEnter(object sender, DragEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine(String.Format("radTreeView2_DragEnter : {0}", e.Effect));
            if (e.Data.GetDataPresent("Telerik.WinControls.UI.RadTreeNode", true) == true)
            {
                e.Effect = DragDropEffects.Move;
            }
        }

        private void radTreeView2_DragDrop(object sender, DragEventArgs e)
        {
            RadTreeNode node = e.Data.GetData(typeof(RadTreeNode)) as RadTreeNode;
            if (node != null)
            {
                if (e.Effect == DragDropEffects.Move)
                {
                    System.Diagnostics.Debug.WriteLine(String.Format("radTreeView2_DragDrop : {0}", e.Effect));
                    this.radTreeView2.Nodes.Add((node.Clone() as RadTreeNode));
                }
            }
        }

        #endregion Telerik Drag&Drop

        #region System.Windows.Forms Drag&Drop

        private void treeView1_ItemDrag(object sender, ItemDragEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine(String.Format("treeView1_ItemDrag : {0}", (e.Item as TreeNode).Text));
            DoDragDrop(e.Item, DragDropEffects.Move);
        }

        private void treeView2_DragEnter(object sender, DragEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine(String.Format("treeView2_DragEnter : {0}", e.Effect));
            if (e.Data.GetDataPresent("System.Windows.Forms.TreeNode", true) == true)
            {
                e.Effect = DragDropEffects.Move;
            }
        }

        private void treeView2_DragDrop(object sender, DragEventArgs e)
        {
            TreeNode node = e.Data.GetData(typeof(TreeNode)) as TreeNode;
            if (node != null)
            {
                if (e.Effect == DragDropEffects.Move)
                {
                    System.Diagnostics.Debug.WriteLine(String.Format("treeView2_DragDrop : {0}", e.Effect));
                    this.treeView2.Nodes.Add((node.Clone()) as TreeNode);
                }
            }
        }

        private void bindingSource1_BindingComplete(object sender, BindingCompleteEventArgs e)
        {

        }

        private void bindingSource1_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
        {
            this.treeView1.Nodes.Clear();
            for (int i = 0; i < this.bindingSource1.Count; i++)
            {
                TreeNode node = new TreeNode((this.bindingSource1[0] as DataRowView).Row["C1"].ToString());
                this.treeView1.Nodes.Add(node);
            }
        }

        #endregion System.Windows.Forms Drag&Drop

 

Alexandre
Top achievements
Rank 1
 answered on 13 Jul 2017
1 answer
81 views

Hello all!

I'm trying to create a custom GridViewRow so I can build in several of my own properties that will make my maintenance screens far easier to manage...so I went about doing this (in vb.net)

 

Friend Class DPSRow
   Inherits GridViewRowInfo

   Private _AttachmentType As AttachmentType

   Public Property AttachmentType() As AttachmentType
       Get
          Return _AttachmentType
       End Get
       Set(ByVal value As AttachmentType)
          _AttachmentType = value
       End Set

   End Property

   Public Sub New(viewInfo As GridViewInfo, ByVal pAttachmentType As AttachmentType)
       MyBase.New(viewInfo)
       _AttachmentType = pAttachmentType
    End Sub
End Class

 

My problem is the GridViewInfo.  I'm pretty sure this object is part of the Grid hierarchy but for the life of me I can't figure out where it would be.  Here's a sample of what I mean when trying to use the above - please note, my GridViewInfo reference is total garbage - I'm just putting it in here to illustrate my question:

 

Sub something()

   Dim myAttachmentType as New AttachmentType(_ProjectID)

   Dim myRow as New DPSRow(ATGrid.Something.Something.LastThing, myAttachmentType)

   ATGrid.Rows.Add(myRow)

End Sub

In this code snippet, the object "LastThing" would be a GridViewInfo object which is required by the constructor of a GridViewRowInfo

Can anyone point me to where I can find this object among the pyramid that is my GridView control?

Any assistance would be very much appreciated!

 

Kindest regards,

CMS

 

 

 

Dimitar
Telerik team
 answered on 12 Jul 2017
1 answer
143 views

I've got a grid cell that is painted with (or contains) an array of 0 - 4 icons which represent the methods in which a customer was contacted during a certain period.

At first I wanted to create an image and assign it to the cell's image property (seemed the easiest option) but it gave me 2 problems.

1) The cell insisted on displaying the image in the centre of the cell even though I'd told the image content to align left.

2) I couldn't think of a safe method to make sure the images are disposed of when no longer in use eg after paging/filtering/sorting etc.

So I thought that I'd use the cell paint event and paint an image to e.cell.graphics as I'd not need to do any memory management.

But there's little info in your help files about how to paint all the default parts of a cell. ie if one wanted to paint a default cell, but draw an image onto it so that selected colours, text fonts, back colour, theming etc etc etc looked the same on the cell. (Multi themed app)

In the microsoft grid view CellPaint event, there's a flag that the dev sets to say that painting has been done, to prevent infinite recursing. I've noticed that flag isn't in your grid view. I wondered how that effected the cell paint if you only wanted to paint a single column of the grid for example.

Dimitar
Telerik team
 answered on 12 Jul 2017
10 answers
164 views
Hello all,

I have designed a Gridview chich has a datasource and contains 2 combobox columns.
the first combobox column is for Department, ValueMember=ID and DisplayMember = Name.
The second combobox column is for operations, valuemmember=id and displaymember=operation.

no what happenes, when the gridview is loaded, the department combobox and operations combobox both are filled with all the values,

i want to fill the Operations Combobox Column based on the value of the Department combobox column.

How to achieve this?

Thanks in Advance.
Muhammad Naveed
Top achievements
Rank 1
 answered on 11 Jul 2017
1 answer
99 views

Hi

When i change the time the clock will be not sync with picked time value in the moment.

If i close the time picker and reopen it the clock is synced by value now.

I want to sync clock position with picked time at the momment.

Please help me soon as possible.

Thnaks

Dimitar
Telerik team
 answered on 11 Jul 2017
1 answer
110 views

Hi, changes to the timeline are resetting after each call to initializecomponent(). For example if I make changes to the timeline, the changes are reset to the default every time I try to run the program. Specifically the timeline scale and range is being reset with each time. Any idea why this could be? Thanks.

Hristo
Telerik team
 answered on 11 Jul 2017
7 answers
223 views

I have a drop down list that functions normally the first time I click the down arrow (the whole list of items displays).  On subsequent clicks the drop down list is only half the height of the control.  The pictures are attached.

I have some code to modify the font size and drop down arrow width..

// DropDownList ddlShortPick
ddlShortPick.ListElement.AutoSizeItems = true;
foreach (RadListDataItem x in ddlShortPick.ListElement.Items)
{
    x.Font = ddlShortPick.Font;
}
ddlShortPick.DropDownListElement.ArrowButton.MinSize = new Size(50, 0);

 

And these are the settings in the designer...

//
// ddlShortPick
//
this.ddlShortPick.AutoSize = false;
this.ddlShortPick.AutoSizeItems = true;
this.ddlShortPick.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
this.ddlShortPick.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ddlShortPick.Location = new System.Drawing.Point(559, 5);
this.ddlShortPick.Name = "ddlShortPick";
this.ddlShortPick.Size = new System.Drawing.Size(320, 31);
this.ddlShortPick.TabIndex = 32;
((Telerik.WinControls.UI.RadDropDownListElement)(this.ddlShortPick.GetChildAt(0))).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;

 

Any idea what would be corrupting the behavior of the control?

 

Thank you,

Gary

Phil
Top achievements
Rank 1
 answered on 10 Jul 2017
0 answers
106 views
I have a gridview with CellValueChanged event on checkbox checked changed, and filtering is enabled
When i try to filter using checkbox column, it gives me exception???
I want some example to implement this scenario.
Ahmed
Top achievements
Rank 1
 asked on 10 Jul 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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?