Telerik Forums
UI for WinForms Forum
1 answer
129 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
117 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
325 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
94 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
180 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
4 answers
164 views
Hi
Sir/Madam,


I attached 2 files,
in 1st file ,grid is exactly fit into screen . it is OK , but

in 2nd file , when  i perform group by  grid size is decreasing and it is not looking good

Can any one help me about this asap.


Thanks&Regards

Saikiran
Svett
Telerik team
 answered on 10 Jun 2011
3 answers
111 views
Using 2009.3.9.1203 version of RadGridView.
When I load a grid layout with LoadLayout and the grid has grouping, the topmost group does not sync with the grid until the user clicks on the group header. Top + n level subgroups work fine. None of the routines to collapse or expand groups works for the top group. Manually adding and removing the group does not work.

Martin Vasilev
Telerik team
 answered on 10 Jun 2011
1 answer
123 views
Forgive me if I am missing something. I was using the NodeMouseUp event to detect when a node was checked or unchecked. The reason I used this and not the NodeCheckedChanged is that NodeMouseUp only fires once whereas NodeCheckedChanged fires for every node checked and when you select the parent node it fires for every child node. The NodeMouseUp worked fine till I upgraded to Q1 2011. Perhaps there is a better way to do what I want. I simply want to know when the selections for the entire tree have been changed and then refresh my GridView based on the values. 

Thank You
Svett
Telerik team
 answered on 10 Jun 2011
1 answer
135 views
Hi guys,

I'm looking for  a quick way to find a record based on one or several values in the grid, datasource for the gridview could be 100 thousand records or more (tied into inventory items for a large grocery store). Telerik gridview is used for a lookup,basically a seed value get's passed to the grid and it needs to locate the record (aka Row) and highlight it.

Could some direct me to right location of an example that would demonstrate the required functionality? Help is appreciated. Thank you.
Stefan
Telerik team
 answered on 10 Jun 2011
1 answer
129 views
Thanks in advance for any assistance.

What event would I use to grab the GridRowInfo when the navigates to a another row? I'm working with the RowsChanged event and it's firing after -each- change to the row when evaluating the NotifyCollectionChangedAction.ItemChanged enum.

Essentially, what I need to do, is if any value in the row changes, I need to get the row and update the database. If I use the RowsChanged event, I potentially would be updating the same record over and over if multiple values are changed for the same record.

Do I need to use a combination of events?
1. RowsChanged - store an instance of the GridViewRow to a local variable
 then
2. RowValidated - commit row information to database?

Is there a more direct way to do what I need to do?

Thanks,

Morgan


Svett
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)
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
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
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
Licensing
VirtualKeyboard
DataLayout
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?