Telerik Forums
UI for WinForms Forum
1 answer
247 views
Hello all,

Is there a way that I display Date AND Tim on xasis? 

ChartValueFormat enum has ShortTime and ShortDate, but NO ShortDateTime. 

Appreciate your helps.

Cheers!
Missing User
 answered on 03 Aug 2011
0 answers
94 views
Hi

I have a telerikGrid:RadGridView as parent and collection of telerikGrid:RadGridView as child of each row of parent grid. i need to expand all the rows of parent gridview showing the childeren when form is loaded

thanks
jagan
Jagadeesh
Top achievements
Rank 1
 asked on 03 Aug 2011
1 answer
128 views
I am looking into replacing our current docking control with the RadDock control. What our current dock control allows us to do is have a fairly simple xml configuration to allow dynamic layouts. We have a bunch of controls that can be dynamically loaded, the customer can control which controls are loaded and the layout (dock position, auto hide, and so on).

Example plugin config
<plugin load="true"
        type="AssemblyName, ClassName"
        path=".">
    <Form>
        <Guid>d3b14ad1-e970-4445-9a27-2cedf211ca3a</Guid>
        <AllowedDock>All</AllowedDock>
        <CurrentDock>Bottom</CurrentDock>
        <CurrentMode>Inner</CurrentMode>
        <IsSelected>true</IsSelected>
        <IsAutoHide>false</IsAutoHide>
        <Width>400</Width>
        <Height>371</Height>
        <ParentGuid>1fbc51f7-f459-425b-884d-91a33602440c</ParentGuid>
        <Name>PTZ</Name>
        <Screen>1</Screen>
    </Form>
</plugin>

This control is a child (controlled by CurrentMode tag) and will be display in the bottom portion of it's parent (controlled by the CurrentDock tag). If the CurrentDock is changed to Fill then it will the same space as it's parent and become a TabControl.

My question is, does the RadDock have the ability to allow me to dynamically build up this layout from a simple configuration? I would like to just add the RadDock control to the form and have it built up from the config file, the customer would also need to be able to change the layout.

This is the code that will load all the controls in the app.config file where plugin load = true. This seems to give me the parent / child tab layout I am looking for, but it seems like it's not the "right" way to do it. For instance, if I want two controls docked Left within the RadDock but tabbed, would it be better to create a ToolWindow and add those two controls to that, or pass in the target control (parent) while calling DockControl?

foreach (SnapInBase plugin in BuildPluginHierarchy(this.plugins))
{
    try
    {
        if (plugin.MetaData.ContainsKey("Form") && plugin.MetaData["Form"] != null)
        {
            XmlNode n = plugin.MetaData["Form"];
 
            plugin.Dock = DockStyle.Fill;
 
            DockPosition position = ParseXmlNode<DockPosition>(n, "DockPosition");
            DockType dockType = ParseXmlNode<DockType>(n, "DockType");
 
            Guid guid = ParseXmlNode<Guid>(n, "Guid");
            int width = ParseXmlNode<Int32>(n, "Width", plugin.Width);
            int height = ParseXmlNode<Int32>(n, "Height", plugin.Height);
            bool isAutoHide = ParseXmlNode<Boolean>(n, "IsAutoHide");
            Guid parentGuid = ParseXmlNode<Guid>(n, "ParentGuid");
            int screen = ParseXmlNode<Int32>(n, "Screen", 1);
 
            if (screen == 1)
            {
                if (parentGuid != Guid.Empty)
                {
                    HostWindow parent;
                    if (this.controlCache.TryGetValue(parentGuid, out parent) == true)
                    {
                        HostWindow window = null;
 
                        window = this.radDock1.DockControl(plugin, parent, position, dockType);
 
                        if (isAutoHide == true)
                        {
                            this.radDock1.AutoHideWindow(window);
                        }
 
                        this.controlCache.Add(guid, window);
                    }
                }
                else
                {
                    var window = this.radDock1.DockControl(plugin, position, dockType);
 
                    if (isAutoHide == true)
                    {
                        this.radDock1.AutoHideWindow(window);
                    }
 
                    this.controlCache.Add(guid, window);
                }
            }
        }
        else
        {
            logger.Error(string.Format("No form metadata for {0}", plugin.Name));
        }
    }
    catch (Exception ex)
    {
        logger.Error(ex);
    }
}

What I am hoping for is to find out is if there is a better way to do what I'm trying to do. I will provide the customer a default layout, and they can change it how they see fit.

Thanks,
Matt
Julian Benkov
Telerik team
 answered on 03 Aug 2011
7 answers
742 views
i have custom controls inside a page view control. the custom control binds data on the load event. the problem is whenever a control is being added to the page view the load event of the control is being fired immediately inside the constructor of the control which holds the page view control. as a result it throws exception when trying to access data.

the following code is the component initialization code which is called from the constructor of the control which holds the page view control

private void InitializeComponent()
        {
            this.rdpvAppCodeFiles = new Telerik.WinControls.UI.RadPageView();
            this.rdpvpBank = new Telerik.WinControls.UI.RadPageViewPage();
            this.ctlManageBank1 = new CRS.Client.App.Documents.CodeFiles.ApplicationCodeFiles.BankDocuments.ctlManageBank();
            ((System.ComponentModel.ISupportInitialize)(this.rdpvAppCodeFiles)).BeginInit();
            this.rdpvAppCodeFiles.SuspendLayout();
            this.rdpvpBank.SuspendLayout();
            this.SuspendLayout();
            //
            // rdpvAppCodeFiles
            //
            this.rdpvAppCodeFiles.Controls.Add(this.rdpvpBank);
            this.rdpvAppCodeFiles.Dock = System.Windows.Forms.DockStyle.Fill;
            this.rdpvAppCodeFiles.Location = new System.Drawing.Point(0, 0);
            this.rdpvAppCodeFiles.Name = "rdpvAppCodeFiles";
            this.rdpvAppCodeFiles.SelectedPage = this.rdpvpBank;
            this.rdpvAppCodeFiles.Size = new System.Drawing.Size(846, 502);
            this.rdpvAppCodeFiles.TabIndex = 1;
            this.rdpvAppCodeFiles.Text = "radPageView1";
            this.rdpvAppCodeFiles.SelectedPageChanged += new System.EventHandler(this.rdpvAppCodeFiles_SelectedPageChanged);
            ((Telerik.WinControls.UI.RadPageViewStripElement)(this.rdpvAppCodeFiles.GetChildAt(0))).StripAlignment = Telerik.WinControls.UI.StripViewAlignment.Right;
            ((Telerik.WinControls.UI.RadPageViewStripElement)(this.rdpvAppCodeFiles.GetChildAt(0))).ItemContentOrientation = Telerik.WinControls.UI.PageViewContentOrientation.Horizontal;
            //
            // rdpvpBank
            //
            this.rdpvpBank.Controls.Add(this.ctlManageBank1);
            this.rdpvpBank.Location = new System.Drawing.Point(10, 10);
            this.rdpvpBank.Name = "rdpvpBank";
            this.rdpvpBank.Size = new System.Drawing.Size(750, 481);
            this.rdpvpBank.Text = "Bank";
            //
            // ctlManageBank1
            //
            this.ctlManageBank1.CurrentMode = CRS.Client.Automation.Documents.ctlDocumentUIBase.OperationMode.None;
            this.ctlManageBank1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ctlManageBank1.Document = null;
            this.ctlManageBank1.Location = new System.Drawing.Point(0, 0);
            this.ctlManageBank1.Name = "ctlManageBank1";
            this.ctlManageBank1.Size = new System.Drawing.Size(750, 481);
            this.ctlManageBank1.TabIndex = 0;
 
            // ctlApplicationCodeFilesSwitchBoard
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.rdpvAppCodeFiles);
            this.Name = "ctlApplicationCodeFilesSwitchBoard";
            this.Size = new System.Drawing.Size(846, 502);
            ((System.ComponentModel.ISupportInitialize)(this.rdpvAppCodeFiles)).EndInit();
            this.rdpvAppCodeFiles.ResumeLayout(false);
            this.rdpvpBank.ResumeLayout(false);
 
            this.ResumeLayout(false);
 
        }


here ctlManageBank1 is my custom control which loads data on its load event. the load event is being called immediately after the control is added to the page object of page view control (bold line).

if i use a tab control instead of a page view control everything goes fine. the load event fires at the time of showing the control, not inside the constructor.


Julian Benkov
Telerik team
 answered on 03 Aug 2011
1 answer
61 views
is there possible to set the
addnewrowposition =bottom propertie of grid in grid theme

plz help

Stefan
Telerik team
 answered on 03 Aug 2011
1 answer
86 views
Hi, i would like to know, the themes of telerik that i build in visual style builder dont run or apply in windows 64bits ?
Im waiting for your response.
Best Regards,

Daniel
Stefan
Telerik team
 answered on 03 Aug 2011
1 answer
128 views

I had created a new thread relating to a question on WinForms GridView, but this is not accessible anymore/has disappeared.
http://www.telerik.com/community/forums/winforms/gridview/editing-gridviewdatetimecolumn.aspx

It does not appear in the WinForms GridView Forum.
However it does appear when we search the WinForms GridView forum with key word "Editing".
Please see attached screenshot.

Just thought someone would like to know.
And if this thread is retrieved, could it please be answered?

Regards
Sameer.
Nikolay
Telerik team
 answered on 03 Aug 2011
1 answer
533 views
Hello

I am working with a databound RadGridView, I would like to intercept data exceptions errors while editing but also while adding a record. At the moment Im more concerned with adding. While adding if the DataError method is called the ErrorText is set for the row, but instead of staying focused in the current cell, it deletes all data in all cells that were entered. There is an exclamation icon set in the first column of the grid when the ErrorText is set but it is overlapping the current icon.

Isnt the e.Cancel = true line supposed to cancel validation and keep the focus in the current cell till valid data is entered?

private void radGridView1_DataError(object sender, GridViewDataErrorEventArgs e)
{
    e.Cancel = false;
    if ((e.Exception) is System.Data.NoNullAllowedException)
    {
        RadGridView view = (RadGridView)sender;
        if (view.CurrentRow is GridViewNewRowInfo)
        {
            view.CurrentRow.ErrorText = e.Exception.Message;
//The following line doesnt work when adding a row, as e.RowIndex will equal -1
//(sender as RadGridView).Rows[e.RowIndex].ErrorText = e.Exception.Message;         
            e.ThrowException = false;        
        }
    }
}

Could you provide me with a way to retain all data that was entered into the row before the error. Also to some method of indicating which cell has the error, and also how to shut off that exclamation icon when the ErrorText is set or have it be the only icon showing?

Attached are pictures to illustrate how the icon is appearing within the row and showing the tooltip with the empty record
Jack
Telerik team
 answered on 03 Aug 2011
2 answers
129 views
Hi everyone!

I've just installed the Controls for WinForm Q2 2011 and everything appears as expected in VS2008, but i'm missing the RichtTextBox in the toolbox. Even by trying to manually add an element to the toolbox i can't find the new RichTextBox by searching all available .net Framwork Components. Is there any trick i don't know?

Best Regards,
Michael
Michael Hilgers
Top achievements
Rank 1
 answered on 03 Aug 2011
1 answer
104 views
In Visual Studio we have added Business Objects as data sources. When we set the default UI to be the RadCheckBox to the bool properties on the business object it automatically binds to the text field.

How can I make it automatically bind to the checked field?

thanks,

gj
Gary
Top achievements
Rank 1
 answered on 02 Aug 2011
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
ProgressBar
CheckedDropDownList
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
VirtualKeyboard
NavigationView
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?