Telerik Forums
UI for WPF Forum
14 answers
453 views
Hello,

is it possible to create the following with the Telerik-GridView:

I'have got some columns which should have two rows of columnheaders. The first line of the columnheader contains a summary (rubric) and should be centered. The captions of the columns should follow in the next line.

Is there a type of cell-span in the GridView?

Please have a look to the screenshot for better unterstanding (first two rows are essential).


Greetings from Germany

Markus
Mike Bennett
Top achievements
Rank 1
 answered on 27 May 2011
0 answers
87 views
Hi, 
I'm doing a student portal project. I'm using asp.net 3.5, and vb.net for codebehind.
I have a problem in the registration section.
See I have 3 gridviews, the first girdview lists all available courses for the current semester, it has a selection option.
when the user clicks on select, the second gridview appears showing availabe sections for a specific course, this gridview has a checkbox controler, when the user check it, the third gridview appears.
this third gridview is for the user to view all the possible going to register sections with a confirm button
once the confirm button is clicked, all needed data is saved in the database.
the thing is, I want the system to check if a specific student had registered for this course before, if he did he can't register to any sections of this course again. i'm having problem in doing that.
involved tables in database are : student, course,  section and student2section
one course has many sections.
many student can register to many sections so we have an intermediary table called student2setcion
can anyone help please??
AA
Top achievements
Rank 1
 asked on 27 May 2011
2 answers
258 views
I have a VB Class Library that has a WPF Window in it with a RadGridView on the window.  My class library has references to Telerik.Windows.Controls, Telerik.Windows.Controls.Data, Telerik.Windows.Controls.GridView, Telerik.Windows.Controls.Input and Telerik.Windows.Data.  When I compile the class library I get the following error in the vb.g file of the WPF Window:
Error 1 Type 'Telerik.Windows.Controls.RadGridView' is not defined. C:\Development\BestpassEM\WPFInfrastructure\obj\Debug\Infrastructure\ResultsWindow.g.vb 58 35 Bestpass.UI.Infrastructure

What could be causing this?  The line it is occuring on is below.
#ExternalSource("..\..\..\Infrastructure\ResultsWindow.xaml",18)
<System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")>  _
Friend WithEvents datagrid As Telerik.Windows.Controls.RadGridView
  
#End ExternalSource

Betsy
Top achievements
Rank 1
 answered on 27 May 2011
3 answers
382 views
Hi Telerik,

I'm having trouble triggering the ContextMenuOpening event in order to handle the event and not show the context menu.

With standard WPF context menu I would handle the event on the control owning the context menu, but I can't seem to get this right with RadContextMenu control. Hope you can guide me on how to achieve this. I have a code block as below:

<telerik:RadCalendar Grid.Row="1" Margin="6,6,6,6" x:Name="calendar" IsTodayHighlighted="False" telerikControls:StyleManager.Theme="Vista"
            DayTemplateSelector="{StaticResource templateSelector}" Columns="4" Rows="3" ViewsHeaderVisibility="Visible" FirstDayOfWeek="Monday"
            HeaderVisibility="Visible" ContextMenuOpening="calendar_ContextMenuOpening">
    <telerik:RadContextMenu.ContextMenu>
        <telerik:RadContextMenu x:Name="cmCalendar" Opened="ContextMenuCalendar_Opened" telerikControls:StyleManager.Theme="Vista">
            <telerik:RadMenuItem x:Name="miHoliday" Header="{x:Static local:CentralCalendarWindowGlossary.miHoliday_Header}" Click="MenuItemHoliday_Click" IsCheckable="True" ToolTipService.ShowOnDisabled="True" ToolTipService.IsEnabled="{Binding Path=IsEnabled}" ToolTip="{DynamicResource toolTipDefault}" />
            <telerik:RadMenuItem x:Name="miNoDistribution" Header="{x:Static local:CentralCalendarWindowGlossary.miNoDistribution_Header}" IsCheckable="True" Click="MenuItemNoDistribution_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.IsEnabled="{Binding Path=IsEnabled}" ToolTip="{DynamicResource toolTipDefault}" />
            <telerik:RadMenuItem IsSeparator="True" />
            <telerik:RadMenuItem x:Name="miSiteDistribution" Header="{x:Static local:CentralCalendarWindowGlossary.miSiteDistribution_Header}" Click="MenuItemSiteDistribution_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.IsEnabled="{Binding Path=IsEnabled}" ToolTip="{DynamicResource toolTipDefault}">
                <telerik:RadMenuItem.Icon>
                    <Image Source="/AN.Planner.Administrator;component/Images/SiteDetailsViewSmall.ico" />
                </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>
        </telerik:RadContextMenu>
    </telerik:RadContextMenu.ContextMenu>
</telerik:RadCalendar>

The event never invokes "calendar_ContextMenuOpening"

Thanks in advance,
Best regards
Kasper Schou
Kasper Schou
Top achievements
Rank 1
 answered on 27 May 2011
3 answers
252 views
We are migrating from Scheduler to ScheduleView because of performance issues with the Scheduler control. Searching online for help on migration didn't return anything useful. So I was trying to see if anyone else had went through this migration and if they can share their experience.

We use the Scheduler control heavily with many of its APIs and seems like many of them are not available in ScheduleView.

Sample code using Scheduler is listed below.
<telerikScheduler:RadScheduler
    ActiveViewDefinitionChanged="scheduler_ActiveViewDefinitionChanged"
    AvailableViewModes="Day, Week, Month"
    AppointmentTemplate="{StaticResource AppointmentTemplate}"
    EditAppointmentDialogStyle="{StaticResource EditDialogStyle}"
    AppointmentTemplateSelector="{StaticResource AppointmentTemplateSelector}"
    SelectedViewStartDateChanged="scheduler_SelectedViewStartDateChanged"
    x:Name="scheduler"
    AppointmentsSource="{Binding Appointments}"
    HorizontalContentAlignment="Stretch"
    OpenModalDialogs="True"
    ViewMode="Day"
    AllDayAreaHeight="0"
    GroupBy="{Binding Path=GroupBy}"
    Margin="0,0,3,0"
    RecurrenceChoiceDialogDefaultRecurrenceMode="Occurrence"
    ShowsConfirmationWindowOnDelete="False"
    MouseRightButtonUp="scheduler_MouseRightButtonUp"
    Style="{StaticResource RadSchedulerStyle}">
    <telerikScheduler:RadScheduler.DayViewDefinition>
        <telerikScheduler:DayViewDefinition
            VisibleDays="1"
            LargeChangeInterval="1d" />
    </telerikScheduler:RadScheduler.DayViewDefinition>
    <telerikScheduler:RadScheduler.WeekViewDefinition>
        <telerikScheduler:WeekViewDefinition
            VisibleDays="7"
            LargeChangeInterval="7d" />
    </telerikScheduler:RadScheduler.WeekViewDefinition>
    <telerikScheduler:RadScheduler.MonthViewDefinition>
        <telerikScheduler:MonthViewDefinition
            VisibleDays="42"
            TimeSlotLength="1"
            SmallChangeInterval="7d"
            LargeChangeInterval="1m" />
    </telerikScheduler:RadScheduler.MonthViewDefinition>
    <telerikScheduler:RadScheduler.ResourceStyleMappings>
        <telerikScheduler:ResourceStyleMapping
            ResourceType="Zones"
            ResourceName="{}"
            HeaderTemplate="{StaticResource ZoneHeaderTemplate}" />
    </telerikScheduler:RadScheduler.ResourceStyleMappings>
</telerikScheduler:RadScheduler>

Thanks!
Yana
Telerik team
 answered on 27 May 2011
6 answers
133 views

Hi,
 i have this sample code:
  RadPane formRadPane = new RadPane() { Header = "Not Document Pane", CanDockInDocumentHost = false };
            Canvas cReference = new Canvas();
            Image imgBg = new Image(new uri("Images/0.png"));
            imgBg.Width = 2000;
            imgBg.Height = 1980;
            cReference.childer.Add(imgBg);

            TextBlock txtBlock = new TextBlock();
            txtBlock.Text = "This Pane Cannot be docked in to document host";
            Canvas.SetLeft(txtBlock, 20);
            Canvas.SetTop(txtBlock, 20);
            cReference.childer.Add(txtBlock);

            FormRadPane.Content = cReference; 

when program run , the cReference's content Uncontrolled by formRadPane .that means cReference's content exceeds window area B.
How do I resolve this problem?

Per
Top achievements
Rank 1
 answered on 27 May 2011
1 answer
137 views
I have a RadNumericUpDown control, with default value of 0.00; but I would like to do the following: when the user clicks in it: the cursor position is placed at the beginning and when the user types, it overwrites the value.  

Can this be achieved?

EDIT: in fact what I want is to put the RadNumericUpDown in overwrite mode. Can this be done?

EDIT 2: for now I found this workaround,which puts it in overwrite model:

        private bool _lengthInputInsertActivated = false;
        private void LengthNumericUpDown_GotFocus(object sender, RoutedEventArgs e)
        {
            if (!_lengthInputInsertActivated)
            {
                KeyEventArgs e1 = new KeyEventArgs(Keyboard.PrimaryDevice, Keyboard.PrimaryDevice.ActiveSource, 0, Key.Insert);
                e1.RoutedEvent = Keyboard.KeyDownEvent;
                InputManager.Current.ProcessInput(e1);
                _lengthInputInsertActivated = true;
            }
        }
Konstantina
Telerik team
 answered on 27 May 2011
1 answer
90 views
I found an issue in http://www.telerik.com/community/forums/silverlight/scheduleview/scheduleview-throws-an-error-when-cancel-create-new-appointment.aspx and have a similar issue when i cancel a createnew in the appointmentcreating event by setting e.cancel = true when there are no appointments in the obseverablecollection of a custom appointment type. I tried creating a sample app with as close to the scenario I could and it did not get the exception. I get the below exception any guidance would be greatly appreciated. This the WPF ScheduleView. 

System.ArgumentOutOfRangeException was unhandled
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  Source=mscorlib
  ParamName=index
  StackTrace:
       at System.Collections.ArrayList.get_Item(Int32 index)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.ListCollectionView.CancelNew()
       at Telerik.Windows.Controls.ScheduleView.ScheduleViewDataConnection.HackCollectionViewBug(Boolean isCommit)
       at Telerik.Windows.Controls.ScheduleView.ScheduleViewDataConnection.CancelNew()
       at Telerik.Windows.Controls.ScheduleViewBase.CreateNew(Slot slot)
       at Telerik.Windows.Controls.ScheduleViewBase.CreateAppointmentWithDialog(Object parameter)
       at Telerik.Windows.Controls.ScheduleViewBase.OnCreateAppointmentExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
       at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
       at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
       at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at OakLeaf.MM.Main.WPF.mmApplicationWrapper.OnStartup(StartupEventArgs eventArgs)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at DSN.Exec.WPF.MainEntry.Main(String[] args) in E:\Visual Studio TFS\Projects\DSN Exec Software\DSN Exec Software\DSN WPF\MainEntry.cs:line 106
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
Konstantina
Telerik team
 answered on 27 May 2011
1 answer
112 views
Hi.

The user changed the calenderview / selecteddate
Sample:
today = 2011.05.20
user changed to 2009.01.02

In my Button i set the current date:
calendar.SelectedDate = Datetime.ToDay;

Before i do this:
if (calendar.DisplayMode != Telerik.Windows.Controls.Calendar.DisplayMode.MonthView )
{
    calendar.DisplayMode = DisplayMode.MonthView;
}



But the calnder doesn´t show the correctly date!
Why?


   







Reinhard
Yana
Telerik team
 answered on 27 May 2011
2 answers
153 views
If a GridView has a selection mode of Extended, is there a way to allow selection of rows by clicking on the selected row and dragging the mouse? if you click on a selected row and drag the mouse, no other rows get highlighted.
Sean 2212
Top achievements
Rank 1
 answered on 27 May 2011
Narrow your results
Selected tags
Tags
+? 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?