Telerik Forums
UI for WinForms Forum
1 answer
259 views
Hi,
          I am using radpageview with outlook mode is there any method by default to focus the current selected page .

In winows i have used  a panel in that i have a method by default like SelectPanel() so can anyone explain regarding this .


Thanks
Hema
Stefan
Telerik team
 answered on 15 Jun 2011
1 answer
172 views
Hi,

I have a CommandBarDropDownButton with several menuitems, several of which I am dynamically changing the text the the CBDropDownButton is clicked.  Several of our users are telling us that the text does not change until the second time they click on the CBDropDownButton.  I cannot duplicate this on my machine but I have seen it on others.  I am handling the click event of the CBDropDownButton and setting the menuitem text there. 

is there a better way to do this to ensure the user will see the dynamic menu item text immediately?
Ivan Todorov
Telerik team
 answered on 15 Jun 2011
4 answers
159 views
Hello,

i have some properties the user should be able to edit in the configuration of my project.
i would like to create a form with a radGridView similar to the property window of the visualstudio where we edit the properties of a control. So the radGridView should contain 2 columns. The first column contains the names of the properties and the second column contains the values for the properties. The values of the properties could contain different values like text, numeric, enumerations, ..

What would be the best way to create the second column?

Kind Regards,

Ramius
Svett
Telerik team
 answered on 15 Jun 2011
1 answer
84 views
I was looking at the GridView/ Custom grouping demo in RadControls demo for WinForms. While grouping by Country properly displays a group color, this is not he case if you try grouping by another column. In this case, some group headers will be colored - not necessarily with correct color for country - while others will be not. Scrolling up and down will cause colorings on group headers to be moved.
Jack
Telerik team
 answered on 15 Jun 2011
2 answers
96 views
Hello, 
I've got something strange on my grid, and I don't know where it comes from.  Every row in my grid is preceded by something that looks like a grouping "+".  If I expand the +, I have an empty line that looks like a separator.  Please have a look at my screenshot, since it's quite difficult to explain.  I don't know where that comes from, and I want that to go away!

Anyone knows what is wrong?

Thank you!
SupportTI
Top achievements
Rank 1
 answered on 13 Jun 2011
1 answer
124 views
Hi,

I have RadMarkupDialog hosted in a form (Editor.Parent = form). My scenario is: write something into editor (text, not markup), add a color or size for that text and click Apply.

When I use it in VS without SP1, everything works fine. But when i try the same scenario in VS with SP1, size and color is returned to default values.

When I looked deeper into code, I've found out, that InnerHTML value of Editor.DesignViewDomDocument.body is without size and color in FONT tag

There are different versions of mshtml.dll (probably because of that SP) on those two computers, could that be the cause of that problem?

Primitive app I use looks like this

public Form1()
{
    InitializeComponent();
 
 
    radMarkupDialog1.Editor.Parent = panel1;
 
    radMarkupDialog1.Editor.EditorClosed +=new EventHandler(Editor_EditorClosed);
}
 
 
void Editor_EditorClosed(object sender, EventArgs e)
{
    // Track down ((radMarkupDialog1.Editor.DesignViewDomDocument).body).innerHTML - In VS without SP, there are font styles for color, size etc., but in VS with SP, they're gone
    ;
}



 Thank you
Martin Vasilev
Telerik team
 answered on 13 Jun 2011
1 answer
114 views
I have used a SplitButton with two menu items on my form.  The menuitems are two - RadMenuItem1 has a text property "Ver 1" and RadMenuItem2 has a text propery "Ver 2" 
(The togglebutton is not an option as I will have some other forms which may have more than two menu items).
The problem is when I select the option Ver 2 the code for "Ver 1" is executing and vice versa.
Placing a messagebox shows the problem.

Please help.

I use the following code:
   Private Sub RadMenuItem1_Click(sender As Object, e As System.EventArgs) Handles RadMenuItem1.Click
        'SetDefaultItem(RadMenuItem1)
        Me.RadSplitButton1.Text = "Ver 1"
    End Sub


    Private Sub RadMenuItem2_Click(sender As Object, e As System.EventArgs) Handles RadMenuItem2.Click
        'SetDefaultItem(RadMenuItem2)
        Me.RadSplitButton1.Text = "Ver 2"
    End Sub


    Private Sub RadSplitButton1_TextChanged(sender As Object, e As System.EventArgs) Handles RadSplitButton1.TextChanged
        Dim part As String = Me.RadSplitButton1.Text

MsgBox(part)  'you will see the error here

        Select Case part       'Me.RadSplitButton1.Text


            Case "Part 1"
                Me.BOOKS2BindingSource.Filter = "VERSION = 'V1'"
                Me.RadPageViewPage1.Item.Visibility = ElementVisibility.Visible
                Me.RadPageView1.SelectedPage = Me.RadPageViewPage1


            Case "Part 2"
                Me.BOOKS2BindingSource.Filter = "VERSION = 'V2'"
                Me.RadPageViewPage1.Item.Visibility = ElementVisibility.Hidden
                Me.RadPageView1.SelectedPage = Me.RadPageViewPage2


        End Select






    End Sub
Stefan
Telerik team
 answered on 13 Jun 2011
6 answers
318 views
I used the following code without success. The forecolor is supposed to change to red but it doesn't. How would I make the forecolor change to red in code below. I am using latest version of controls.
Thanks
Sunil

If e.Node.Text = GroupNameRadTextBox.Text.Trim() Then
            e.NodeElement.BackColor = Color.LightYellow
            e.NodeElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid
            e.NodeElement.ForeColor = Color.Red
            e.NodeElement.DrawFill = True
        Else
            e.NodeElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local)
            e.NodeElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local)
            e.NodeElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local)
            e.NodeElement.ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local)
        End If
Svett
Telerik team
 answered on 13 Jun 2011
3 answers
92 views
Hi,
I have a problem with the MenuItem. I have developed an application with the RadMenu. Everything works beautifully. When I using "PCAnywhere"(Remote Access) to access the application, the RadMenuItems in the remote session is not visible. On the computer itself, yes, but not in the remote session.

Is this a configuration problem?

First of all, thank you!

Michael
Stefan
Telerik team
 answered on 13 Jun 2011
3 answers
176 views

I am attempting to build hierarchy in a grid from business objects. If I select ‘Auto Generate Hierarchy’ and ‘Auto Generate Columns’ it does work.  Expanding a parent row shows its related children in RadGrid.

However, when I attempt to programmatically build the relation it does not work. Expanding a parent row does not show its related children.

I have followed the GridView Object Relational Hierarchy Mode documentation word for word without success.  I have used ‘property builder’ of the grid as per the tutorial but that did not help either.

Here is a sample code:

        private void FormEventStaffPlans_Load(object sender, EventArgs e)
        {
            // --------- Parent -----------
            // Staff plan unique identifier.
            GridViewDecimalColumn dColumn = new GridViewDecimalColumn("StaffPlanId");
            dColumn.HeaderText = "StaffPlanId";
            dColumn.IsVisible = false;
            dColumn.ReadOnly = true;
            this.radGridViewStaffPlans.Columns.Add(dColumn);
 
            // Total required staff.
            dColumn = new GridViewDecimalColumn("NumberOfStaffPerShift");
            dColumn.HeaderText = "Staff Req";
            this.radGridViewStaffPlans.Columns.Add(dColumn);
 
            // Total male
            dColumn = new GridViewDecimalColumn("NumberOfMalePerShift");
            dColumn.HeaderText = "Male";
            this.radGridViewStaffPlans.Columns.Add(dColumn);
 
            // Total female
            dColumn = new GridViewDecimalColumn("NumberOfFemalePerShift");
            dColumn.HeaderText = "Female";
            this.radGridViewStaffPlans.Columns.Add(dColumn);
 
            // Employee Id (TO DO: change this to dropdown box)
            dColumn = new GridViewDecimalColumn("EmployeeId");
            dColumn.HeaderText = "Empoloyee";
            this.radGridViewStaffPlans.Columns.Add(dColumn);
 
            // Labour hire company Id (TO DO: change this to dropdown list)
            dColumn = new GridViewDecimalColumn("HireCompanyId");
            dColumn.HeaderText = "HireCompanyId";
            this.radGridViewStaffPlans.Columns.Add(dColumn);
            this.radGridViewStaffPlans.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
 
            // --------- Child -----------
 
            // Create child template (for staff shifts)
            GridViewTemplate childTemplate = new GridViewTemplate();
            this.radGridViewStaffPlans.Templates.Add(childTemplate);
 
            // Set columns of child template
            // Shift unique identifier.
            dColumn = new GridViewDecimalColumn("ShiftId");
            dColumn.HeaderText = "ShiftId";
            dColumn.IsVisible = false;
            dColumn.ReadOnly = true;
            childTemplate.Columns.Add(dColumn);
 
            // Shift from (display date only).
            GridViewDateTimeColumn dtColumn = new GridViewDateTimeColumn("ShiftFrom");
            dtColumn.Format = DateTimePickerFormat.Short;
            dtColumn.HeaderText = "Date From";
            childTemplate.Columns.Add(dtColumn);
 
            // Shift to (display date only).
            dtColumn = new GridViewDateTimeColumn("ShiftTo");
            dtColumn.Format = DateTimePickerFormat.Short;
            dtColumn.HeaderText = "Date To";
            childTemplate.Columns.Add(dtColumn);
 
            // Shift from (display time only).
            dtColumn = new GridViewDateTimeColumn("ShiftFrom");
            dtColumn.Format = DateTimePickerFormat.Time;
            dtColumn.HeaderText = "Shift Start";
            childTemplate.Columns.Add(dtColumn);
 
            // Shift to (display time only).
            dtColumn = new GridViewDateTimeColumn("ShiftTo");
            dtColumn.Format = DateTimePickerFormat.Time;
            dtColumn.HeaderText = "Shift End";
            childTemplate.Columns.Add(dtColumn);
 
            // Shift part.
            dColumn = new GridViewDecimalColumn("ShiftPart");
            dColumn.HeaderText = "Shift Part";
            childTemplate.Columns.Add(dColumn);
 
            // Break duration.
            dColumn = new GridViewDecimalColumn("BreakDuration");
            dColumn.HeaderText = "Break Duration";
            childTemplate.Columns.Add(dColumn);
 
            // Variation code.
            GridViewTextBoxColumn tColumn = new GridViewTextBoxColumn("VariationCode");
            tColumn.HeaderText = "Variation Code";
            childTemplate.Columns.Add(tColumn);
 
            // Shift cost.
            dColumn = new GridViewDecimalColumn("ShiftCost");
            dColumn.HeaderText = "Shift Cost";
            dColumn.ReadOnly = true;
            childTemplate.Columns.Add(dColumn);
 
            // Shift cost type.
            tColumn = new GridViewTextBoxColumn("ShiftCostType");
            tColumn.HeaderText = "Shift Cost Type";
            dColumn.ReadOnly = true;
            childTemplate.Columns.Add(tColumn);
 
            // Area (TO DO: change this to dropdown list).
            dColumn = new GridViewDecimalColumn("AreaId");
            dColumn.HeaderText = "Area";
            childTemplate.Columns.Add(dColumn);
 
            // Shift type.
            tColumn = new GridViewTextBoxColumn("ShiftType");
            tColumn.HeaderText = "Shift Type";
            childTemplate.Columns.Add(tColumn);
 
            childTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
 
            // Add the relation between parent (staff plans) and the child (staff plan shifts)
            GridViewRelation relation = new GridViewRelation(this.radGridViewStaffPlans.MasterTemplate,                                 childTemplate);
            relation.ChildColumnNames.Add("EventShift");
            this.radGridViewStaffPlans.Relations.Add(relation);
 
            // Add data source to grid (parent).
            IList<EventStaffPlan> list = _siteProxy.GetEventStaffPlans(34);
            this.radGridViewStaffPlans.DataSource = list;
        }
 
 
    public class EventStaffPlan:BusinessObject
    {
        /// <summary>
        /// Default constructor for EventStaffPlan class.
        /// </summary>
        public EventStaffPlan() { }
        /// <summary>
 
        /// Overloaded constructor for EventStaffPlan class.
        /// Initialises automatic properties.
        /// </summary>
        /// <param name="staffPlanId">Staff plan unique identifier.</param>
        /// <param name="numberOfStaffPerShift">Total number of staff per shift.</param>
        /// <param name="numberOfMaleStaffPerShift">Number of male staff per shift.</param>
        /// <param name="numberOfFemaleStaffPerShift">Number of female staff per shift. </param>      
        /// <param name="employeeId">Employee unique identifier.</param>
        /// <param name="hireCompanyId">Hire company unique identifier.</param>
        /// <param name="eventShift">List of EventStaffShift objects.</param>
        public EventStaffPlan(int staffPlanId, int numberOfStaffPerShift, int numberOfMaleStaffPerShift,                int numberOfFemaleStaffPerShift, int employeeId, int hireCompanyId,             IList<EventStaffShift> eventShift)
        {
            StaffPlanId = staffPlanId;
            NumberOfStaffPerShift = numberOfStaffPerShift;
            NumberOfMalePerShift = numberOfMaleStaffPerShift;
            NumberOfFemalePerShift = numberOfFemaleStaffPerShift;          
            EmployeeId = employeeId;
            HireCompanyId = hireCompanyId;
            EventShift = eventShift;
        }
 
        /// <summary>
        /// Gets or sets staff plan unique identifier.
        /// </summary>
        public int StaffPlanId { get; set; }
 
        /// <summary>
        /// Gets or sets total number of staff per shift.
        /// </summary>
        public int NumberOfStaffPerShift { get; set; }
 
        /// <summary>
        /// Gets or sets number of male employees per shift.
        /// </summary>
        public int NumberOfMalePerShift { get; set; }
 
        /// <summary>
        /// Gets or sets number of female employees per shift.
        /// </summary>
        public int NumberOfFemalePerShift { get; set; }
 
        /// <summary>
        /// Gets or sets employee unique identifier.
        /// </summary>
        public int EmployeeId { get; set; }
 
        /// <summary>
        /// Gets or sets hire company unique identifier.
        /// </summary>
        public int HireCompanyId { get; set; }
 
        /// <summary>
        /// Gets or sets list of event staff plan shift objects.
        /// </summary>
        public IList<EventStaffShift> EventShift { get; set; }
    }



Class EventStaffShift does not have any related lists.
Working with version: 2011.1 11.419

Julian Benkov
Telerik team
 answered on 10 Jun 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
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?