Telerik Forums
UI for WinForms Forum
5 answers
133 views
Hi,

I have created a system in which I edit a recurrence from a web page but want to use a windows service to process the recurrences. 

I have the web page creating a recurrence string as shown below:

DTSTART:20100319T000000Z
DTEND:20100319T000100Z
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;WKST=MO

I am then in the service using that string to generate the next date in the sequence, change the recurrence string and save back into the database.  In addition if the recurrence is of a finite count I need to decrease the count that is within the string.

Other than manipulating my original string and saving that back into the database how do I do this?  The class structure is completely differnt to it's web counterpart which seems a little odd given that in theory the functionality should be the same.

Regards,

Jon



abhijit
Top achievements
Rank 1
 answered on 15 Jul 2011
1 answer
324 views
Is it possible to replace the standard +/- icons for exanding and collapsing nodes with my own custom images?

I found this article:

http://www.telerik.com/help/winforms/treeview-working-with-nodes-node-images.html

Which suggests this is possible.  However I was struggling to find the StateImageKey property and a further article on the web seemed to suggest it was removed from the laster version of the components.

Any help gratefully recieved.
Stefan
Telerik team
 answered on 15 Jul 2011
5 answers
2.2K+ views
Hi,

I have a PNG image (round button) and I want to use that as button. I have tried setting the image property to that image in radButton control but it shows the transparent area as well. My Question is how can I use round images as buttons and is the procedure for using transparent images same for all controls?

Thanks
Afraz Ali
Stefan
Telerik team
 answered on 15 Jul 2011
1 answer
131 views
Hi
I'm using Pie chart to show my table statistics. My table has two column ID and Kind and i select count(ID) group by Kind. now i wanna label series by kind and their quantity in the pie (I prefer to show by percentage). My table is in dataset. The problem is that rad chart does not bind Series automatically. Please help me! Thanks 
Yavor
Telerik team
 answered on 15 Jul 2011
1 answer
127 views

Hi!

By default all properties from row object (databound item) goes to Conditional Formatting Rules Manager.

You can take a look at the attachment. 

  1. How can I select which columns should be available in this window?
  2. Can I somehow disable conditional formatting for whole grid? How to remove this option from column header context menu?

 

I have found option for hidding column chooser: radGridView1.AllowColumnChooser but I cannot find similar option for hiding conditional formatting.

 

 

 

 

 

Regards

Svett
Telerik team
 answered on 15 Jul 2011
1 answer
133 views
We are trying to logically determine the next row to select if the currently selected row disappears. Users can select a row and perform an operation that may or may not cause this row to reappear after the grid is refreshed. We cannot determine in advance if the currently selected row will be in the refreshed dataset, and we need to perform a full refresh to display new data that may have appeared for the user. If the current row is in the refreshed dataset, that is no problem. Each row contains a unique identifier in a hidden column and we can save the unique identifier and reselect this row after refreshing.

The problem occurs if one or more of these rows disappear after a refresh. We want to move the selection to the previous row (right above the selection) as displayed to the user with sorting and grouping applied. How do we determine which row this would be?

Basically, we need to be able to answer this question: Which row is visually displayed immediately above the currently selected row?

We have it working for the most part, but the code is very complicated and still does not work exactly as we would like. For example, if the user selects the first row in a group and it disappears, the best that we can do is to go to the previous group and select the first row in that group. We would like to select the last row in the previous group. There are also problems if the entire group that contains the currenty selected row disappears.

The GridNavigator won't help because I don't actually want to select the next or previous row. I just want to know which row I would select if I were to call the SelectPreviousRow or SelectNextRow methods, find the unique identifier value in this row, and store it to select the desired row after refreshing.
Jack
Telerik team
 answered on 15 Jul 2011
2 answers
148 views
Hi,
I am trying to implement a custom DataGridCellElement that contains a label and a hyperlink. For both elements I use RadLabelElements with different font styles. 
My problem is, that if the cell is too small to hold the whole text of both elements the text of the hyperlink is drawn into the neighboring cell on the right. What is wrong with my code?
(Q1 2011 SP1, .NET 3.5)

Thanks in advance, Christoph
public class HyperlinkCellElement : GridDataCellElement
{
    private RadLabelElement _headerLabel;
    private RadLabelElement _linkLabel;
 
    public HyperlinkCellElement(GridViewColumn column, GridRowElement row) : base(column, row) {}
 
    protected override Type ThemeEffectiveType { get {return typeof(GridDataCellElement); } }
 
    public override void Initialize(GridViewColumn column, GridRowElement row)
    {
        base.Initialize(column, row);
        _headerLabel.Text = column.Name;
    }
 
    protected override void CreateChildElements()
    {
        _headerLabel = new RadLabelElement();
        _headerLabel.Font = new Font(Font, FontStyle.Bold);
        _headerLabel.Margin = new Padding(0, 2, 0, 0);
        _headerLabel.LabelText.AutoEllipsis = true;
        _headerLabel.LabelText.AutoSize = true;
        _headerLabel.LabelText.AutoSizeMode = RadAutoSizeMode.Auto;
        _headerLabel.LabelText.TextWrap = false;
         
        _linkLabel = new RadLabelElement();
        _linkLabel.Font = new Font(Font, FontStyle.Underline);
        _linkLabel.MouseHover += (s, e) =>
             { if (Cursor.Current == Cursors.Default) Cursor.Current = Cursors.Hand; };
        _linkLabel.MouseLeave += (s, e) =>
             { if (Cursor.Current == Cursors.Hand) Cursor.Current = Cursors.Default; };
        _linkLabel.Margin = new Padding(0, 2, 0, 0);
        _linkLabel.LabelText.AutoEllipsis = true;
        _linkLabel.LabelText.AutoSize = true;
        _linkLabel.LabelText.AutoSizeMode = RadAutoSizeMode.Auto;
        _linkLabel.LabelText.TextWrap = false;
 
        this.Children.Add(_headerLabel);
        this.Children.Add(_linkLabel);
 
        _linkLabel.Click += new EventHandler(_label_Click);
    }
 
    void _label_Click(object sender, EventArgs e)
    {
        //TODO;
    }
 
    protected override void DisposeManagedResources()
    {
        _linkLabel.Click -= new EventHandler(_label_Click);
        base.DisposeManagedResources();
    }
 
    protected override void SetContentCore(object value)
    {
        _linkLabel.Text = value.ToString();
    }
 
    protected override SizeF ArrangeOverride(SizeF finalSize)
    {
        if (this.Children.Count == 2)
        {
            var label = this.Children[0];
            var link = this.Children[1];
 
            var labelWidth = Math.Min(finalSize.Width, label.DesiredSize.Width);
            var linkWidth = Math.Min(link.DesiredSize.Width, finalSize.Width - labelWidth);
 
            label.Arrange(new RectangleF(
                0,
                (finalSize.Height / 2) - (label.DesiredSize.Height / 2),
                labelWidth,
                label.DesiredSize.Height));
 
            link.Arrange(new RectangleF(
                label.Size.Width,
                (finalSize.Height / 2) - (link.DesiredSize.Height / 2),
                linkWidth,
                link.DesiredSize.Height));
        }
        return finalSize;
    }
 
    public override bool IsCompatible(GridViewColumn data, object context)
    {
        return data is GridViewHyperlinkColumn && context is GridDataRowElement;
    }
}
Christoph
Top achievements
Rank 1
 answered on 15 Jul 2011
1 answer
135 views
 Hi,

I have got a scheduler control, which scrolls to work hours perfectly well when the view is changed (Day, Week). However, when the "ShowWeekend" check box is toggled, the scroll to work time does not work.

The code:
Private Sub radSchedulerAppointmentsNavigator_ShowWeekendStateChanged(ByVal sender As Object, ByVal args As Telerik.WinControls.UI.StateChangedEventArgs) Handles radSchedulerAppointmentsNavigator.ShowWeekendStateChanged
        
If TryCast(Me.radSchedulerAppointments.ActiveView, SchedulerMonthView) Is Nothing Then
            TryCast(Me.radSchedulerAppointments.ActiveView, SchedulerDayViewBase).RulerWidth = 43
            TryCast(Me.radSchedulerAppointments.ActiveView, SchedulerDayViewBase).DayCount = 1
            TryCast(Me.radSchedulerAppointments.ActiveView, SchedulerDayViewBase).AutoScrollToWorkTime = True
 
            Dim dtStart As DateTime = DateTime.Parse(GetOptionValue("WORKINGHOURS", "Start"))
            Dim tsStart As New TimeSpan(dtStart.Hour, dtStart.Minute, 0)
            Dim dtEnd As DateTime = DateTime.Parse(GetOptionValue("WORKINGHOURS", "End"))
            Dim tsEnd As New TimeSpan(dtEnd.Hour, dtStart.Minute, 0)
            TryCast(Me.radSchedulerAppointments.ActiveView, SchedulerDayViewBase).WorkTime = New TimeInterval(tsStart, tsEnd)
 
            If RadRadioButtonGroup.ToggleState = Enumerations.ToggleState.On Then
                TryCast(Me.radSchedulerAppointments.SchedulerElement.ViewElement, SchedulerDayViewGroupedByResourceElement).ScrollToWorkHours()
            Else
                TryCast(Me.radSchedulerAppointments.ActiveView, SchedulerDayViewBase).RulerWidth = 45
                TryCast(Me.radSchedulerAppointments.SchedulerElement.ViewElement, SchedulerDayViewElement).DataAreaElement.ScrollView.Value = Point.Empty
                TryCast(Me.radSchedulerAppointments.SchedulerElement.ViewElement, SchedulerDayViewElement).DataAreaElement.Table.ScrollToWorkHours()
            End If
        End If
    End Sub

Interestingly, if the scheduler is "Grouped by resources" mode (determined by RadRadioButtonGroup.ToggleState), then the scrolling works as required. If it is in normal mode (where RadRadioButtonGroup.ToggleState <> ToggleState.On), scrolling does not work, and the scheduler view starts at 2 AM. Working hours are being determined by options - and the work time is being specified correctly from options (8 AM to 5 PM).

BTW, what does "AutoScrollToWorkTime" do? I did not have it before, but it doesn't seem to make any difference.

Similar code is being used in ActiveViewChanged event of the scheduler control.

Also, I am working with Telerik WinForms version Q1 2011 (and VS 2010). As far as I remember, the code worked before the controls were upgraded from version Q2 2010 SP1. But I could be wrong.

Regards.
Ivan Todorov
Telerik team
 answered on 14 Jul 2011
3 answers
124 views
hi,

i've read this article and that works very well, but my problem is i mus push enter to create the new value.
In my app, i want the new value in the list if i leave the cell or on the endedit event, something like that.
Can you help me please to do that ?
thanks a lot
Martin Vasilev
Telerik team
 answered on 14 Jul 2011
9 answers
263 views
Hi,

is it possible to print treeview ?
thanks
almir
Julian Benkov
Telerik team
 answered on 14 Jul 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?