Telerik Forums
UI for WinForms Forum
1 answer
114 views
Hi ALL,
    I want to impliment search to radscheduler and
OPEN the Appointment that the text is in how to do?
                                              Any Help Apperciated!
                                                         Jeff Link

   
Private Sub RadButton3_Click(sender As System.Object, e As System.EventArgs) Handles RadButton3.Click
        If RadTextBox.Text = "" Then
            MessageBoxEx.ButtonsDividerVisible = False
            MessageBoxEx.Show("Please Enter some text to search for!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning)
        Else
            FindAppointment()
        End If
 
    End Sub
 
    Private Sub FindAppointment()
 
 
        For Each app As Appointment In Me.RadScheduler1.Appointments
 
 
            If app.Subject.Contains(Me.RadTextBox.Text) Or app.Location.Contains(Me.RadTextBox.Text) Or app.Description.Contains(Me.RadTextBox.Text) Then
 
                Me.RadScheduler1.ActiveView.StartDate = app.Start
 
                Me.RadScheduler1.SchedulerElement.InvalidateMeasure(True)
 
                SchedulerUIHelper.SelectAppointment(Me.RadScheduler1, app, True)
 
                Exit For
 
            End If
        Next
    End Sub
          
Ivan Todorov
Telerik team
 answered on 13 Dec 2011
1 answer
105 views

Hello!

I've been wanting to implement a copy function for appointments but I can't get it quite right.

The idea is simple, you have a form with a scheduler, which views multiple resources. When you start dragging and keep the control key pressed, you don't actually move the appointment but you copy it.

My code looks like this:

void rdSchedule_AppointmentDropping(object sender, AppointmentMovingEventArgs e)
        {
            if (ModifierKeys == Keys.Control)
            {
                if (e.Appointment is AmfAppointment)
                {
                    AmfAppointment copiedAppointment = ((AmfAppointment)e.Appointment).Copy();
                    copiedAppointment.Start = e.NewDate;
                      
                    this.rdSchedule.Appointments.Add(copiedAppointment);
                    e.Cancel = true;
                }
            }
        }

rdSchedule is the Scheduler control.

AmfAppointment is my own inheritance of an Appointment and Copy() is a function to duplicate the Appointment.

This only (seems to, still some bugs to work out) work for copying an appointment to the same resources.

When dragging the appointment to another resource nothing happens.

Also; the AppointmentMovingEventArgs has a NewDate but no NewResource (i.e.)? And the e.Appointment.ResourceId is the old ResourceId so I can't get it from there either.


What is the right approach here? And if so how can I make this work for copying between different resources as well?

Thank you!

Ivan Todorov
Telerik team
 answered on 13 Dec 2011
1 answer
102 views
Hi, this is my second post about this since my first was not answered and then I guess removed.

I am using MS Visual Studio Professional.  The code is ASP.net.  I am using Telerik's RadGrid (latest versions I assume, I don't know how to tell..)

I am trying to add a Required validation to a bound Drop Down Box in the RadGrid.  I am thinking my problem is a syntax issue because I can get it to work for a regular text box, but the dropdown box just does not work.

This is the code I use for the textbox which works (trying to use the code block format):
    Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
 
 
        If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
 
 
            Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem)
            Dim editor As GridTextBoxColumnEditor = DirectCast(item.EditManager.GetColumnEditor("CurrencyTarget_NativeCurrent"), GridTextBoxColumnEditor)
            Dim cell As TableCell = DirectCast(editor.TextBoxControl.Parent, TableCell)
            Dim validator As New CompareValidator ' RequiredFieldValidator()
 
 
            editor.TextBoxControl.ID = "NCReqValidator"
            validator.ControlToValidate = editor.TextBoxControl.ID
            validator.Operator = ValidationCompareOperator.GreaterThanEqual
            validator.ValueToCompare = "0"
            validator.ErrorMessage = "* Native Current is a required field"
            cell.Controls.Add(validator)
 
        End If
End Sub


But when I add the same code for a drop down box, it does not work:
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
 
 
    If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
        Dim item2 As GridEditableItem = TryCast(e.Item, GridEditableItem)
        Dim editor2 As GridDropDownListColumnEditor = DirectCast(item2.EditManager.GetColumnEditor("ddCountryCode"), GridDropDownListColumnEditor)
        Dim cell2 As TableCell = DirectCast(editor2.DropDownListControl.Parent, TableCell)
        Dim validator2 As New CompareValidator ' RequiredFieldValidator()
 
        editor2.DropDownListControl.ID = "CCReqValidator"
        validator2.ControlToValidate = editor2.DropDownListControl.ID
        validator2.Operator = ValidationCompareOperator.NotEqual
        validator2.ValueToCompare = "XXX"
        validator2.ErrorMessage = "* Country Code is a required field"
        cell2.Controls.Add(validator2)
 
    End If
 
 
End Sub


Milena
Telerik team
 answered on 13 Dec 2011
5 answers
105 views
Hello,

I was going through the course documentation and searched through the forums a bit but can't find anything telling how to do basic cell manipulation of the radgrid (which means I probably overlooked something or this is so basic, it's not covered).  

So, if in vb.net I wanted to move something from column 1 row 4 to column 2 row 5 of a grid we'll call "VoltageGrid", is there an easy command to do that?  Do I have to give each cell a unique name in order to do this?  I know in basic gridview (the standard grid), it would look like this:

VoltageGrid.Rows.Item(2).Cells(5).Value = VoltageGrid.Rows.Item(1).Cells(4).Value

Could someone let me know a) how to do this and b) where I can find this info so I don't have to bug anyone with basics of these grids?  I can go back to using just the standard vb.net but it sounds like there are a lot of good features in telerik's grid.  I just need to learn how to use them.  Thanks!

-Jay
Nikolay
Telerik team
 answered on 13 Dec 2011
4 answers
128 views
Is it possible to have the timeline on top and resources on the left?
Ivan Todorov
Telerik team
 answered on 13 Dec 2011
5 answers
144 views
I want to relipcate the look and feel of the timeline controls as shown in this section of the product documentations...

http://www.telerik.com/products/winforms/scheduler.aspx#custom-resources-and-resource-grouping

However, using the examples on how to load data in when grouping by resources, but editing it so I can get it working as I want, it fails to load. I have been through my code and can't see anything wrong with however?

If someone can let me have a working sample of how to layout the schedule as shown in the example above, or point out where I'm going wrong, I'd be really grateful!


Schedule.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Timeline;
Schedule.GetTimelineView().ResourcesPerView = 8;
Schedule.GroupType = GroupType.Resource;
  
SchedulerDayViewGroupedByResourceElement headerElement = Schedule.SchedulerElement.ViewElement as SchedulerDayViewGroupedByResourceElement;
Resource resource;
resource = new Resource();
resource.Id = new EventId("AC00-1");
resource.Name = "AC00-1";
resource.Color = Color.Beige;
Schedule.Resources.Add(resource);
resource = new Resource();
resource.Id = new EventId("AC00-2");
resource.Name = "AC00-2";
resource.Color = Color.PowderBlue;
Schedule.Resources.Add(resource);
resource = new Resource();
resource.Id = new EventId("AC00-3");
resource.Name = "AC00-3";
resource.Color = Color.PowderBlue;
Schedule.Resources.Add(resource);
Schedule.Appointments.BeginUpdate();
Appointment appointment;
appointment = new Appointment(new DateTime(2011, 12, 07, 12, 00, 00), new DateTime(2011, 12, 09, 12, 00, 00), "Summary", "Descriptions", "Location");
appointment.ResourceId = this.Schedule.Resources[0].Id;
appointment.BackgroundId = (int)AppointmentBackground.Important;
appointment.ToolTipText = "This is my custom Tooltip";
Schedule.Appointments.Add(appointment);
Ivan Todorov
Telerik team
 answered on 13 Dec 2011
1 answer
283 views
Hi,

I looked at the documentation article:
http://www.telerik.com/help/winforms/richtextbox-features-document-elements-tables.html
to get started.

I am battling to place an image into a cell.

To insert an image into the richtextbox is used:           
Dim i1 As New Bitmap(fullfilepathtopicture) 'where fullfilepathtopicture is already a string of the full path and filename
Me.RadRichTextBox1.InsertImage(i1)

Now if I want to insert an image and text into a picture in a table as follows I am battling:

It should look something like the attachment

Any help would be welcome.
Jack
Telerik team
 answered on 12 Dec 2011
2 answers
139 views
With "Nested Scroll Bars" turned on the user is able to re-size the hierarchy grid, what event can I use to capture this user action?
Jack
Telerik team
 answered on 12 Dec 2011
1 answer
112 views
I am trying with RadGridView v2011.3  with virtual mode. But I can not fint out ColumnCount and RowCount properties. Is there any change in this version?
Julian Benkov
Telerik team
 answered on 12 Dec 2011
4 answers
149 views
Hi there,

i have a MDI-Application with one window which contains a TreeView.
When loading the Window, I do the function FillUserList() and it works fine.
But if I try to update th elist after that, it failed.
This is my code for loading the data:

rtvUserList.DataSource = null;
              
lsmu = RfcCalls.GetListOfMainUsers();
              
rtvUserList.DataSource = lsmu;
rtvUserList.DisplayMember = "DisplayValue\\DisplayValue";
rtvUserList.ValueMember = "Uname";
rtvUserList.Name = "DisplayValue";
rtvUserList.ChildMember = "SIPMainUser\\Subuser";
rtvUserList.ClearSelection();
I debugged it and my data is like it has to be.
I tried a Refresh() but that also doesn't work.

Any hint.

Best Regards
Manfred
Julian Benkov
Telerik team
 answered on 12 Dec 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?