Telerik Forums
UI for WinForms Forum
2 answers
157 views
I want to rename "Drag a column here to group by this column","Click here to add a new row"
Is it possible ?
Anton
Telerik team
 answered on 08 Jan 2013
3 answers
90 views
I am using sql server database.
1. It is a self referencing database created as per Binding to Self Referencing Data in help document
2.Table definition is given below.
CREATE TABLE [dbo].[Node] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[ParentID] INT NULL,
[Name] TEXT NULL,
[Note] TEXT NULL,
PRIMARY KEY CLUSTERED ([ID] ASC)
);

3.code binded as folws
this.radTreeView1.DisplayMember = "Name";
this.radTreeView1.ParentMember = "ParentID";
this.radTreeView1.ChildMember = "ID";
this.radTreeView1.ValueMember = "ID";
radTreeView2.TreeViewElement.EditMode =TreeNodeEditMode.Text;

4.I had deleted a node and updated database using tableadpter method.But if the node have child nodes those data will not be removed from original database.So how delete nodes +child nodes and update database ?
Ivan Todorov
Telerik team
 answered on 08 Jan 2013
2 answers
131 views
Hello Team,
i have a requirement where i need to map the columns of grid1 in form1 to grid2 in form2

and after mapping i need to populate the grid2 column data to grid1 column which is in different form, Can you help me out how to achieve this, and the two forms are active child forms of an mdi parent form
 
Sree
Top achievements
Rank 1
 answered on 08 Jan 2013
2 answers
159 views
Hello,

I am tasked to replicate the New Tab functionality of Google Chrome. I have attached sample code below that mostly accomplishes this. However there is still one bug that I am unable to fix, and it is related to the RadDock tabstrip not redrawing after ActivateWindow() is called.

To reproduce this problem, please run the following code. You should see a tab named "New Tab 0" and a mini-tab to its right, which will create additional new tabs if you click on it. Click the mini-tab so you have two named tabs. Then, right-click on the right-most named tab ("New Tab 1", unless you created more) and select "Floating" to pop it out. Here is where the problem happens. We never want the MiniTab to have focus, so the method MiniTabGotFocus() will have been called, which activates the window to its left. However, the tabs are not redrawn to reflect this. BUT, if you click on Form1 parent dialog to give it focus (or close that popped out window), the tabs will immediately redraw correctly. So the window to the left was in fact Activated, but the tabs do not reflect this until Form1 has focus again.

Does this make sense? I have tried to Invalidate() the TabStrip but that does not force it to redraw. I can only cause it to redraw correctly by clicking on the Form1 parent dialog to give it focus. What I would like help on is how to force the TabStrip to redraw.

This is using Telerik v2011-8-31.

Thanks,

Michelle

using System;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using Telerik.WinControls.UI.Docking;
 
namespace WindowsFormsApplication1
{
    public class Form1 : Form
    {
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required designer variable.
        /// </summary>
        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);
        }
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.chartingDock = new Telerik.WinControls.UI.Docking.RadDock();
            ((System.ComponentModel.ISupportInitialize)(this.chartingDock)).BeginInit();
            this.chartingDock.SuspendLayout();
            this.SuspendLayout();
            //
            // chartingDock
            //
            this.chartingDock.Dock = System.Windows.Forms.DockStyle.Fill;
            this.chartingDock.Location = new System.Drawing.Point(0, 0);
            this.chartingDock.Name = "chartingDock";
            this.chartingDock.Padding = new System.Windows.Forms.Padding(5);
            this.chartingDock.RootElement.MinSize = new System.Drawing.Size(25, 25);
            this.chartingDock.RootElement.Padding = new System.Windows.Forms.Padding(5);
            this.chartingDock.Size = new System.Drawing.Size(573, 397);
            this.chartingDock.SplitterWidth = 4;
            this.chartingDock.TabIndex = 0;
            this.chartingDock.TabStop = false;
            this.chartingDock.Text = "chartingDock";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(573, 397);
            this.Controls.Add(this.chartingDock);
            this.IsMdiContainer = true;
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.chartingDock)).EndInit();
            this.chartingDock.ResumeLayout(false);
            this.ResumeLayout(false);
        }
 
        #endregion
 
        private RadDock chartingDock;
 
        public Form1()
        {
            InitializeComponent();
 
            chartingDock.AutoDetectMdiChildren = true;
 
            chartingDock.DockWindowClosed += ChartingDockDockWindowClosed;
            chartingDock.DockWindowClosing += ChartingDockDockWindowClosing;
            chartingDock.TransactionCommitted += ChartingDockTransactionCommitted;
            chartingDock.DockWindowAdded += ChartingDockDockWindowAdded;
            chartingDock.GetDefaultDocumentTabStrip(true).TabStripElement.ItemsChanged += TabStripElement_ItemsChanged;
             
            EnsureNewChartMiniTabExists();
        }
 
        private int count;
        private void AddTab()
        {
            AddTab("New Tab " + count++);
        }
         
        private void AddTab(string title)
        {
            var f = new ToolWindow
                        {
                            Text = title,
                        };
            if (title == NewChartTabText) f.BackColor = Color.Black;
 
            chartingDock.SetWindowState(f, DockState.TabbedDocument);
        }
         
        private const string NewChartTabText = " ";
        private DockWindow switchTab;
        void ChartingDockDockWindowClosing(object sender, DockWindowCancelEventArgs e)
        {
            var index = Array.IndexOf(chartingDock.DocumentManager.DocumentArray, e.NewWindow);
            switchTab = index == chartingDock.DocumentManager.DocumentArray.Count() - 2 && index > 0
                           ? chartingDock.DocumentManager.DocumentArray[index - 1]
                           : null;
        }
 
        void ChartingDockDockWindowClosed(object sender, DockWindowEventArgs e)
        {
            if (switchTab != null) chartingDock.ActivateWindow(switchTab);
        }
 
        void ChartingDockTransactionCommitted(object sender, RadDockTransactionEventArgs e)
        {
            EnsureNewChartMiniTabExists();
 
            //for when the only chart is double-clicked to pop out, create a new blank chart
            if (chartingDock.DocumentManager.DocumentArray.Where(w => w.Text != NewChartTabText).Count() == 0)
            {
                AddTab();
            }
 
            //if the committed window was the newcharttab, subscribe to the click event
            var window = e.Transaction.AssociatedWindows.FirstOrDefault();
            if (window != null && window.Text == NewChartTabText)
            {
                window.TabStripItem.Click -= MiniTabClicked;
                window.TabStripItem.Click += MiniTabClicked;
                window.GotFocus += MiniTabGotFocus;
            }
        }
 
        private void EnsureNewChartMiniTabExists()
        {
            if (chartingDock.DocumentManager.DocumentArray.Where(w => w.Text == NewChartTabText).Count() == 0)
            {
                AddTab(NewChartTabText);
            }
        }
 
        static void ChartingDockDockWindowAdded(object sender, DockWindowEventArgs e)
        {
            var window = e.DockWindow as ToolWindow;
            if (window == null) return;
 
            DockTabStrip strip = e.DockWindow.DockTabStrip;
            if (strip != null)
            {
                var count = strip.Controls.Count;
                var index = e.DockWindow.Text == NewChartTabText ? count - 1 : count - 2;
                if (index < 0) index = 0;
                strip.Controls.SetChildIndex(e.DockWindow, index);
            }
        }
 
        void TabStripElement_ItemsChanged(object sender, Telerik.WinControls.UI.RadPageViewItemsChangedEventArgs e)
        {
            var window = chartingDock.DocumentManager.DocumentArray.Where(w => w.Text == NewChartTabText).FirstOrDefault() as ToolWindow;
            if (window == null) return;
 
            var tabCount = chartingDock.DocumentManager.DocumentArray.Count();
 
            var index = Array.IndexOf(chartingDock.DocumentManager.DocumentArray, window);
            if (index >= tabCount - 1) return;
             
            DockTabStrip strip = window.DockTabStrip;
            if (strip == null) return;
             
            strip.Controls.SetChildIndex(window, tabCount - 1);
        }
         
        private void MiniTabClicked(object sender, EventArgs e)
        {
            AddTab();
        }
         
        private void MiniTabGotFocus(object sender, EventArgs e)
        {
            var tabCount = chartingDock.DocumentManager.DocumentArray.Count();
            if (tabCount < 2) return;
 
            var window = chartingDock.DocumentManager.DocumentArray[tabCount - 2];
            chartingDock.ActivateWindow(window); 
        }
    }
}
Michelle
Top achievements
Rank 1
 answered on 07 Jan 2013
4 answers
363 views
Hi,

I'm using a RadForm as an MDI container and loading child MDI forms into it.  I load the child forms in a maximized state but seem to be unable to hide the default MDI menu in the parent form.

The MDI section of the RadForm documentation says:

"When a MDI child Form is maximized, it automatically hides its title bar and the parent form displays a default MDI menu. This menu contains controls can execute the basic window commands on the currently maximized MDI child:"

I would like the "default MDI menu" to be hidden.  I will control the windowstate of the child forms myself. 

I've tried setting the MinimizeBox and MaximizeBox to false (on the child forms) and also changing the FormBorderStyle, all to no avail.

 

 

Any help or advice would be greatly appreciated.

Please see the attached JPG for an illustration.

Many Thanks,

Joe

Peter
Telerik team
 answered on 07 Jan 2013
2 answers
114 views
Hi,

Is there a way where I can override the font size on HeaderText property and remove the borders around the RadGroupbox?

/Hendrik
Hendrik Johns
Top achievements
Rank 1
 answered on 05 Jan 2013
1 answer
198 views
Hi,

is there for win forms only the skins

- controldefault
- telerik metro
- telerik metro blue
- office 2010 black, blue, silver
- win7
- breeze
- desert
- hightcontrastblack

available, which are supported too?
Plamen
Telerik team
 answered on 05 Jan 2013
1 answer
76 views
Hi,

If I enable spellchecking via IsSpellCheckingEnabled =true, when I delete text from the RichTextBox by holding down backspace or the delete key, the RichTextBox seems to pause, and I can't see the characters deleted one by one, and therefore can't tell when to release the delete key.


Plamen
Telerik team
 answered on 04 Jan 2013
1 answer
136 views
Hi,

I have a strange situation.
Sometimes when I add a RadGridView to a form in design mode, the RadGridView is not accesible in the code editor.
Steps to recreate problem:
    *    create new project in VS2010
    *    Add form/RadForm (doesn't matter which one, I had problem with both forms)
    *    Add RadGridView to the form via designer, drag and drop on the form.
    *    Go to code editor via F7
    *    Add a method to the form "Public sub test"
    *    Start typing "Radgridview" the code completion doesn't find anything called radgridview.   See attached file.

This does not happen all the time. Anybody had thesame problem?

Kind regards,

Guy
Plamen
Telerik team
 answered on 04 Jan 2013
2 answers
105 views
Hello,

I just upgraded to the latest version of RadControls for Winforms and am noticing an issue with RadRichTextBox and importing HTML.

Attached are screen shots of an HTML imported using the new version vs. the old version.  The new looks more like the actual HTML except that the list items have no spacing and are very hard to read.  Since I'm generating the HTML at run time I would be fine with a solution that involves changing the HTML only to work better with the new version of the control. 

I attempted to attach the HTML file itself but it was not allowed.   Instead I have pasted the portion of the html code that causes the issue below.

Thanks

Doug



<ul style="margin-left:20;padding-left:10;margin-top:5;margin-bottom:5">
<li>Web Export: Updated to include watermark markups.</li>
<li>Web Cases: Added "Check idsService Stations" to Tools menu.  This brings up a grid view of stations currently running idsService (1.0.0.4 or later), their version and last activity times.</li>
<li>Web Cases: When the form is loaded, a message box is displayed if there are no stations detected running idsService.</li></ul>
Doug
Top achievements
Rank 1
 answered on 03 Jan 2013
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?