Telerik Forums
UI for WinForms Forum
13 answers
306 views
For data binding in winform scheduler, i want to update database when the appointment is added, updated rather than when some update button is clicked.

Currently, the documentations provided is perfectly describing how it work with button, and i love it. Nonetheless, i want to find better, and easy way to update appointment, so we can get rid of using update button.

Is there any event property for radscheduelr that i can use in this condition? or Any other way to do this?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 01 Oct 2014
1 answer
267 views
I am able to add a custom function no problem, however; doing so seems to remove all the default functions (see screenshot). Any ideas on how to add a custom function and leave the default functions as well?

Telerik.Data.Expressions.ExpressionContext.Context = new MyExpressionContext();
Telerik.WinControls.UI.RadExpressionEditorForm.ExpressionItemsList.Add(
    new Telerik.Data.Expressions.ExpressionItem
{
    Name = "MarketDate (Endur)",
    Value = "MarketDate()",
    Syntax = "MarketDate()",
    Type = Telerik.Data.Expressions.ExpressionItemType.OtherFunc,
    Description = "Returns the market date as it appears in the market manager."
});

Using the LoadFromXml function as described in the help has the same results.
Dimitar
Telerik team
 answered on 30 Sep 2014
1 answer
156 views
Hello,

Is it possible to change all the child nodes position, to align with the root node. So all the nodes (root and child) will be aligned at the left. 
And one more question. Is it possible to change the color inside the checkbox or the radio button, and the text in black (in a treeview with checkboxes and radio buttons). 

Thank you in advance

Eduard
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Sep 2014
1 answer
461 views
I am currently converting a VB.net project over to Teleriks components.  On one of my forms i have multiple panels.  When one of the panels get clicked the borderstyle changes to fixed3D and the rest change to FixedSingle.  But, with telerik borderstyle is not a member.  Is there a work away around this?  Do i need to change it from a panel to a label for this feature?  Below is my code.

Thank You

#Region "PRIORITY PANEL SELECT"
    Private Sub Panel2_Clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel2.Click
        Try
            If Panel2. = BorderStyle.FixedSingle Then
                Panel2.BorderStyle = BorderStyle.Fixed3D
                Panel3.BorderStyle = BorderStyle.FixedSingle
                Panel4.BorderStyle = BorderStyle.FixedSingle
                Panel5.BorderStyle = BorderStyle.FixedSingle
                Panel6.BorderStyle = BorderStyle.FixedSingle
            Else
                Panel2.BorderStyle = BorderStyle.FixedSingle
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub Panel3_Clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel3.Click
        Try
            If Panel3.BorderStyle = BorderStyle.FixedSingle Then
                Panel3.BorderStyle = BorderStyle.Fixed3D
                Panel2.BorderStyle = BorderStyle.FixedSingle
                Panel4.BorderStyle = BorderStyle.FixedSingle
                Panel5.BorderStyle = BorderStyle.FixedSingle
                Panel6.BorderStyle = BorderStyle.FixedSingle
            Else
                Panel3.BorderStyle = BorderStyle.FixedSingle
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub Panel4_Clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel4.Click
        Try
            If Panel4.BorderStyle = BorderStyle.FixedSingle Then
                Panel4.BorderStyle = BorderStyle.Fixed3D
                Panel3.BorderStyle = BorderStyle.FixedSingle
                Panel2.BorderStyle = BorderStyle.FixedSingle
                Panel5.BorderStyle = BorderStyle.FixedSingle
                Panel6.BorderStyle = BorderStyle.FixedSingle
            Else
                Panel4.BorderStyle = BorderStyle.FixedSingle
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub Panel5_Clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel5.Click
        Try
            If Panel5.BorderStyle = BorderStyle.FixedSingle Then
                Panel5.BorderStyle = BorderStyle.Fixed3D
                Panel3.BorderStyle = BorderStyle.FixedSingle
                Panel4.BorderStyle = BorderStyle.FixedSingle
                Panel2.BorderStyle = BorderStyle.FixedSingle
                Panel6.BorderStyle = BorderStyle.FixedSingle
            Else
                Panel5.BorderStyle = BorderStyle.FixedSingle
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub Panel6_Clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel6.Click
        Try
            If Panel6.BorderStyle = BorderStyle.FixedSingle Then
                Panel6.BorderStyle = BorderStyle.Fixed3D
                Panel3.BorderStyle = BorderStyle.FixedSingle
                Panel4.BorderStyle = BorderStyle.FixedSingle
                Panel5.BorderStyle = BorderStyle.FixedSingle
                Panel2.BorderStyle = BorderStyle.FixedSingle
            Else
                Panel6.BorderStyle = BorderStyle.FixedSingle
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
#End Region





George
Telerik team
 answered on 30 Sep 2014
6 answers
170 views

Since upgrading from Q2 2010 (Currently on v.2011.2.11.831), I have found an issue with the checkboxes not drawing properly when you click on the parent check box  which recursively checks all children nodes (see Main 2 –Subs in jpg).  If you expand the node first or after the first time the checkboxes draw properly.  Is there a something I can do to force the redraw so the checkboxes paint correctly?

Below is a sample program and the code I use to recursively check the child nodes. If you click on the checkbox of one of the Mains it will check all children and expand it.

 

using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls.UI;
  
namespace TreeViewTest
{
    public partial class Form1 : Form
    {
        private System.ComponentModel.IContainer components;
  
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        private Telerik.WinControls.UI.RadTreeView radTreeView1;
        private void InitializeComponent()
        {
            this.radTreeView1 = new Telerik.WinControls.UI.RadTreeView();
            ((System.ComponentModel.ISupportInitialize)(this.radTreeView1)).BeginInit();
            this.SuspendLayout();
            // 
            // radTreeView1
            // 
            this.radTreeView1.Location = new System.Drawing.Point(1, 13);
            this.radTreeView1.Name = "radTreeView1";
            this.radTreeView1.Size = new System.Drawing.Size(496, 347);
            this.radTreeView1.SpacingBetweenNodes = -1;
            this.radTreeView1.TabIndex = 0;
            this.radTreeView1.Text = "radTreeView1";
            this.radTreeView1.NodeCheckedChanged += new Telerik.WinControls.UI.RadTreeView.TreeViewEventHandler(this.radTreeView1_NodeCheckedChanged);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(497, 372);
            this.Controls.Add(this.radTreeView1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.radTreeView1)).EndInit();
            this.ResumeLayout(false);
  
        }
  
        public Form1()
        {
            InitializeComponent();
        }
  
        private void radTreeView1_NodeCheckedChanged(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
        {
            this.radTreeView1.NodeCheckedChanged -= radTreeView1_NodeCheckedChanged;
            if (e.Node.Nodes.Count > 0)
            {
                this.CheckAllChildNodes(e.Node, e.Node.Checked);
            }
            e.Node.Expanded = true;
            RadTreeNode topNode = GetTopNode(e.Node);
            CheckAllChildNodesForChecked(topNode);
            this.radTreeView1.NodeCheckedChanged += new RadTreeView.TreeViewEventHandler(radTreeView1_NodeCheckedChanged);
  
        }
        private void CheckAllChildNodes(RadTreeNode treeNode, bool nodeChecked)
        {
            foreach (RadTreeNode node in treeNode.Nodes)
            {
                node.Checked = nodeChecked;
                if (node.Nodes.Count > 0)
                {
                    this.CheckAllChildNodes(node, nodeChecked);
                }
            }
        }
        private bool CheckAllChildNodesForChecked(RadTreeNode treeNode)
        {
            bool childChecked = false;
            foreach (RadTreeNode node in treeNode.Nodes)
            {
                if (node.Nodes.Count > 0)
                {
                    if (this.CheckAllChildNodesForChecked(node))
                    {
                        childChecked = true;
                    }
                }
                else
                {
                    if (!childChecked)
                    {
                        childChecked = node.Checked;
                    }
                }
            }
            if (childChecked)
            {
                treeNode.Checked = true;
            }
            else
            {
                treeNode.Checked = false;
            }
  
            return childChecked;
        }
        private RadTreeNode GetTopNode(RadTreeNode treeNode)
        {
            RadTreeNode topTreeNode = treeNode;
            if (topTreeNode.Parent != null)
            {
                topTreeNode = GetTopNode(topTreeNode.Parent);
            }
  
            return topTreeNode;
        }
  
        private void Form1_Load(object sender, EventArgs e)
        {
            radTreeView1.Nodes.Clear();
            RadTreeNode root = new RadTreeNode("root");
            root.CheckType = CheckType.CheckBox;
            for (int x = 1; x < 4; x++)
            {
                RadTreeNode main = new RadTreeNode("Main " + x.ToString());
                main.CheckType = CheckType.CheckBox;
                for (int y = 1; y < 4; y++)
                {
                    RadTreeNode sub = new RadTreeNode("Sub " + y.ToString());
                    sub.CheckType = CheckType.CheckBox;
                    main.Nodes.Add(sub);
                }
                main.Expanded = false;
                root.Nodes.Add(main);
            }
            root.Expanded = true;
            radTreeView1.Nodes.Add(root);
        }
  
    }
}

Stefan
Telerik team
 answered on 30 Sep 2014
11 answers
1.1K+ views
The telerik radgridview takes a long time to load all records.

  Dim strProp As String = "Select * from " & ViewName
  Dim daProp As New OleDb.OleDbDataAdapter(strProp, conNFAD_NEW)
  Dim dsProp As New DataSet
  daProp.Fill(dsProp, "dtProp")
  rgvMain.DataSource = dsProp.Tables("dtProp")

(rgvMain) being the radgridview

The query returns 31 000 records (8 columns). It takes about 10 seconds to load.

--------------

I tried instead of doing "select * from"  to do a "select top 500". But when you filter the radgridview it filters the 500 records it returned form the query not the 31 000. which is correct.

But:

Is there a way to re-query the grid when a filter is applied so that it would return the top 500 records with the applied filter.

Thanks,

Goran Djuric

George
Telerik team
 answered on 30 Sep 2014
5 answers
187 views
I have a date coming from the database in the format yyyymmdd.  I would like it to display in the drop down as mm/dd/yyyy.  I thought I could accomplish this with the FormatString, but as I'm finding out...not so much.  Anybody got any ideas how to accomplish this?

Thanks
Steve
Dimitar
Telerik team
 answered on 29 Sep 2014
2 answers
463 views
Hi - I'm trying to print silently to the default printer though either the the radPDFViewerNavigator print button or the radPDFViewer default context menu.

For the radPDFViewerNavigator print button click event, I have the following:
me.RadPdfViewer1.Print(False)

This causes the document to print directly to the default printer but then right after that it still brings up the print dialog box.  Is there any way to keep the dialog box from showing?

As for the context menu print option, I can't seem to find a way to get the click event of this in order to override showing the print dialog box.

Any assistance on this will be greatly appreciated.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 29 Sep 2014
2 answers
176 views
Hi Team,

i am creating new design for my windows application and i am using visual style builder 2014.

i have created design for many controls till now but now i am facing issue in ListView.
When we create design for ListView it will be only applied to simple view but not icon view or detail view.

Now here i need to design Icon View for ListView. So, for this which event i should design?

Thank You.
jhon
Top achievements
Rank 1
 answered on 29 Sep 2014
17 answers
258 views
Hello everybody I'm from Brazil so I do not know if what I wrote here is right, but back to the subject of a need to help make a BubbleBar, if someone had a project to send me an example would be grateful, because I do not know the codes got mount the RadControls for WinForms Q3 2010 Demos and multiple errors. I will mention a few:
* Error 1 'RadControlsWinFormsApp1.Form1'does not contain 'the definition for' EnabledQSFButtons' and the extension method 'EnabledQSFButtons' accepting a first argument of type' RadControlsWinFormsApp1.Form1 'could b found (are you missing a usingdirective or an assembly reference? ) C: \ test \ RadControlsWinFormsApp1 \ RadControlsWinFormsApp1 \ Form1.cs 17 18RadControlsWinFormsApp1
* Error   2   The type or namespace name 'Examples' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)   C:\teste\RadControlsWinFormsApp1\RadControlsWinFormsApp1\Form1.Designer.cs   31   43   RadControlsWinFormsApp1
* Error   3   'RadControlsWinFormsApp1.Form1' does not contain a definition for 'settingsPanel' and no extension method 'settingsPanel' accepting a first argument of type 'RadControlsWinFormsApp1.Form1' could be found (are you missing a using directive or an assembly reference?)   C:\teste\RadControlsWinFormsApp1\RadControlsWinFormsApp1\Form1.Designer.cs   39   62   RadControlsWinFormsApp1
* Error   7   The type or namespace name 'Examples' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)   C:\teste\RadControlsWinFormsApp1\RadControlsWinFormsApp1\Form1.Designer.cs   77   23   RadControlsWinFormsApp1
* Warning   10   Could not find type 'RadControlsWinFormsApp1.BubbleBar'.  Please make sure that the assembly that contains this type is referenced.  If this type is a part of your development project, make sure that the project has been successfully built.       0   0  
* Warning   11   The variable 'bubbleBar1' is either undeclared or was never assigned.   C:\teste\RadControlsWinFormsApp1\RadControlsWinFormsApp1\Form1.Designer.cs   169   0  
* Warning   13   Could not find type 'settingsPanel'.  Please make sure that the assembly that contains this type is referenced.  If this type is a part of your development project, make sure that the project has been successfully built.   C:\teste\RadControlsWinFormsApp1\RadControlsWinFormsApp1\Form1.Designer.cs   173   0   
The sooner help me be very grateful as I am doing my course conclusion work and would like to implement this option.
Thank you for your attention.
Alan


Stefan
Telerik team
 answered on 29 Sep 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
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?