Telerik Forums
UI for WPF Forum
2 answers
86 views
Hello

Could you please provide me with any working example of firing gridview event from ribbonview.
I'd like to ribbon option click to grid deleting event. Any help will be greatly appreciated.


regards
AndyL
Top achievements
Rank 1
 answered on 20 Jun 2012
4 answers
577 views
Hello,

From my reading of this line "

When you are using the RadBusyIndicator control you always have to set its Content property. This will be the content on top of which you want to visualize the RadBusyIndicator control." in this article http://www.telerik.com/help/silverlight/radbusyindicator-getting-started.html I mocked up this quick demo to see if I could use it. WPF app loads a window. In the window is a frame which loads a page. On that page is a button that when clicked puts the thread to sleep for 3 seconds. In that button I get a handle to the parent window and set the IsBusy to true....but it never shows. I've tried numerous variations but I can't get it to work in my project or my mockup??

MainWindow:

<Window x:Class="LoadingTest.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadBusyIndicator x:Name="Thnk" IsBusy="false" telerik:StyleManager.Theme="Expression_Dark"  >
            <Frame Name="frm_BigBro" Grid.Row="0" Source="Page1.xaml" SnapsToDevicePixels="True" />
        </telerik:RadBusyIndicator>
    </Grid>
</Window>

Main Page cs

public void StartThinking()
        {
            Thnk.IsBusy = true;
        }
 
        public void StopThinking()
        {
            Thnk.IsBusy = false;
        }


Page1 XAML

<Grid>
    <TextBlock Text="My Page" />
    <Button x:Name="Button1" Click="Button1_Click" Width="80" Height="20" />
</Grid>

Page1 cs

private void Button1_Click(object sender, RoutedEventArgs e)
        {
            MainWindow wndow = new MainWindow();
 
            wndow = Window.GetWindow(sender as DependencyObject) as MainWindow;
            wndow.StartThinking();
 
            System.Threading.Thread.Sleep(3000);
 
            wndow.StopThinking();
 
        }

I'm sure it works so I must be doing something wrong?

TIA
JB

ITA
Top achievements
Rank 1
 answered on 20 Jun 2012
1 answer
137 views
Hi,

How do I get the Or or AND operators, them from the RadFilterControl

I have a RadDataFilter that allows us to create Filter conditions.

I want to access the Filter expression created,

The FieldDescriptors gives me a list like

1. FirstName IsEqualTo Brian
2. LastName IsEqualTo Jackson
3. ... etc

how do I get the operators between the descriptors i.e
something like -- FirstName isEqualToBrian "Or" LastName IsEqualTo Jackson


Dimitrina
Telerik team
 answered on 20 Jun 2012
0 answers
137 views

Hi we are using Telerik controls 2011 Q1.

We have an application that has a Docking control, and inside another control that has Docking control.

The parameter AllowUnsafeMode = "true" on both.

When we drag the inner Docking we got next exception:

Exception.Message:

 "The specified Visual is not an ancestor of this Visual."

Exception.CallStack;

 at System.Windows.Media.Visual.TrySimpleTransformToAncestor(Visual ancestor, Boolean inverse, GeneralTransform& generalTransform, Matrix& simpleTransform)

   at System.Windows.Media.Visual.InternalTransformToAncestor(Visual ancestor, Boolean inverse)

   at System.Windows.Media.Visual.TransformToAncestor(Visual ancestor)

   at Telerik.Windows.Controls.RadDocking.GetElementPositionRelatedToPopup(FrameworkElement element) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadDocking.cs:line 1868

   at Telerik.Windows.Controls.RadDocking.MoveCompassToElement(FrameworkElement element) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadDocking.cs:line 1883

   at Telerik.Windows.Controls.RadDocking.ShowHideCompass(Point position, RadPaneGroup group, Boolean isCompassOverDH) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadDocking.cs:line 1823

   at Telerik.Windows.Controls.RadDocking.MoveDraggedElement(Point position, ToolWindow draggedWindow) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadDocking.cs:line 1782

   at Telerik.Windows.Controls.RadDocking.OnDragDelta(Point globalPosition, Object draggedElement) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadDocking.cs:line 862

   at Telerik.Windows.Controls.RadDocking.OnDragDelta(Object sender, DragInfoEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\RadDocking.cs:line 1309

   at Telerik.Windows.Controls.Docking.DragInfoEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\DragDrop\DragInfoEventArgs.cs:line 48

   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

   at Telerik.Windows.Controls.Docking.FakePopup.<.ctor>b__0(Object s, RoutedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Popup\FakePopup.cs:line 26

   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

   at Telerik.Windows.Controls.Docking.DragDropHelper.DragDelta(UIElement target, UIElement dragRoot, MouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\DragDrop\DragDropHelper.cs:line 55

   at Telerik.Windows.Controls.Docking.DragDropHelper.DragDelta(UIElement target, MouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\DragDrop\DragDropHelper.cs:line 50

   at Telerik.Windows.Controls.Docking.ToolWindow.OnToolWindowMouseMove(Object sender, MouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\ToolWindow.cs:line 712

   at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

   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, Int32 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, Boolean isSingleParameter)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)

   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.Run(Form mainForm)

   at xxxxxxxxx.Main(String[] args) in C:\xxxxxxxx\SplashForm.cs:line 155

There is fix for that?

albu
Top achievements
Rank 1
 asked on 20 Jun 2012
4 answers
133 views
I have a context menu as shared resource.
<Window>
 <Window.Resources>
        <!-- Context Menu -->
        <!-- Enabling/Disabling of menu items is controlled by ContextMenuExtensions.OnContextMenuOpened -->
        <Navigation:RadContextMenu x:Key="ViewMenu" x:Shared="true"
                                   Model:ContextMenuExtensions.NotifyOnMenuOpen="True"
                                   ItemClick="MenuViewItemClick">   
 <Navigation:RadMenuItem/>
</Navigation:RadContextMenu  >
<Window.Resources>
<Grid>
<Dock:RadPane>
<Grid Navigation:RadContextMenu.ContextMenu="{StaticResource ViewMenu}">
<Border>
<RadGridView/>
</Border>
</Grid>
</Dock:RadPane>
<Dock:RadPane>
<Grid Navigation:RadContextMenu.ContextMenu="{StaticResource ViewMenu}">
</Grid>
</Dock:RadPane> 

And a floating radpane
The RadGridView has RowDetailsTemplate defined.

Depending on where the mouse is click the contextmenu is shown, and I use the contextmenu.GetClickedElement method.

If I rightclick on the radgridview without opening the floating pane the GetClickedElement is correct. But if I open the floating pane and then rightclick on the radgridview the GetClickedItem is not returned corectly. The Floating Pane is returned even though I clicked on radgridview details.
 What could be a possible issue with this?



Konstantina
Telerik team
 answered on 20 Jun 2012
5 answers
224 views
Version: Q1 2012 .NET4

Having updated from the Q3 2010, we noticed a problem in the resize behavior of the RadTickBar, when the RadSlider is provided with a TickDataTemplate which renders textual information for each tick. While resizing the slider to a smaller size, there seems to be a point of the process after which the RadTickBar cannot keep up. From that point on, the outer ticks of the slider start to get clipped out, even though the distance between the ticks appears to be enough to fit them all. On top of that, the position of each tick at that point 
miss-matches the corresponding position of the thumb of the slider (thus proving that the slider it self has resized successfully, while the tick-bar has not).

We have tried to set a MinWidth for the RadTickBar through the TickBarStyle property, however that causes an InvalidOperationException. Perhaps that is something you could check as well.

The following is the sample code which reproduces this behavior. To do so, just execute it and try to gradually resize the window to a smaller size. Plus, as far as the second issue (regarding the RadTickBar MinWidth) is concerned, try uncommenting the corresponding XAML code, and executing the project.

Yours faithfully,
Nikos Nakas
Entersoft SA Development Department

Window XAML markup:

<Window x:Class="MainWindow"
        xmlns:local="clr-namespace:WpfRadSliderTest"
        Title="MainWindow" Height="350" Width="525">
  <Window.Resources>
    <local:IntegerToMonthConverter x:Key="intToMonthConv" />
  </Window.Resources>
  <Grid>
    <telerik:RadSlider Margin="25" VerticalAlignment="Center"
                       telerik:StyleManager.Theme="Windows7"
                       Minimum="0" Maximum="5" TickFrequency="1"
                       IsMouseWheelEnabled="True" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True"
                       TickPlacement="BottomRight">
      <telerik:RadSlider.TickTemplate>
        <DataTemplate>
          <Grid Background="Purple"
                MinHeight="{Binding Path=ActualHeight, Mode=OneWay, RelativeSource={RelativeSource AncestorType=telerik:RadTickBar}}">
            <StackPanel>
              <Ellipse Width="5" Height="5" Fill="Black" />
              <Label Content="{Binding Mode=OneWay, Converter={StaticResource intToMonthConv}}" Foreground="Yellow" />
            </StackPanel>
          </Grid>
        </DataTemplate>
      </telerik:RadSlider.TickTemplate>
      <!--<telerik:RadSlider.TickBarStyle>
        <Style TargetType="telerik:RadTickBar">
          <Setter Property="MinWidth" Value="50" />
        </Style>
      </telerik:RadSlider.TickBarStyle>-->
    </telerik:RadSlider>
  </Grid>
</Window>

Value Converter:

Public Class IntegerToMonthConverter
  Implements IValueConverter
 
  Private Shared ReadOnly Months As String() = {"January", "February", "March", "April", "May", "June"}
 
  Public Function Convert(value As Object, targetType As System.Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
    Dim index = CInt(value)
    If index < 0 OrElse index >= Months.Length Then Return String.Empty
    Return Months(index)
  End Function
 
  Public Function ConvertBack(value As Object, targetType As System.Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
    Throw New NotSupportedException
  End Function
 
End Class
Stefan
Telerik team
 answered on 20 Jun 2012
1 answer
155 views
Currently we are implementing keyboard navigation in the application. Can you please tell me how to set focus on following items in RadGridView using keyboard.
1. Filtering dropdown shown in coumn header of RadGridView.
2. GridViewToggleButton used to expand/collapse child grids in case Hierarchical Grids..
Nedyalko Nikolov
Telerik team
 answered on 20 Jun 2012
1 answer
60 views
Hi,

How can I create multiple floating radpanes which are running on multiple threads?
Yana
Telerik team
 answered on 20 Jun 2012
1 answer
120 views
Hi,

is there any easy way to compare to RadGridViews? Ihave two GridViews with the same ViewModel. GridViewA is the source
and GridViewB ist the target.
On Application Load i bind first the RadGrievB with Data from a Database. Afterwards i want to bind GridViewA from a second source.
But All the Items which are in GridViewA may not be in GridViewA. I hope this is clear!?

Is there a easy way to handle it? Or must i select each item from database to check if it is in the GridViewB?

GridViewA:
Source = txt-file
ViewModel=Pakete

GRidViewB:
Source=Database (original source txt-file)
Viewmodel=Pakete

Thanks a lot
Regards
Rene
Nick
Telerik team
 answered on 20 Jun 2012
2 answers
110 views
Hi,

I am evaluating the Rad controls for a new project.

specifically Radfilter and GridView.

I have added both to my project but they are not visible in designer or on the wpf form when i run the app.

Am I missing something

See xaml below

<Window x:Class="TelerikRadFilter.MainWindow"
        Title="MainWindow" Height="auto" Width="auto">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
         
        <StackPanel>
            <Button Content="YTest" HorizontalAlignment="Center" Width="100"/>
            <telerik:RadDataFilter Name="radDataFilter"  Background="Aqua"
                               Grid.Row="0"
                               MinHeight="193" MaxHeight="250" Width="700"
                               Source="{Binding Employees}"
                               Margin="1"/>
        </StackPanel>
 
       
        <telerik:RadGridView Name="radGridView"
                             Grid.Row="1"
                             MinHeight="193" MaxHeight="250" Width="700"
                             ItemsSource="{Binding Employees}" ColumnWidth="*"
                             IsFilteringAllowed="False"
                             CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed"
                             AutoGenerateColumns="False"
                             Margin="1">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}" Header="First Name"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}" Header="Last Name"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding DateOfBirth}" DataFormatString="{}{0:d}" Header="Date Of Birth"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Address}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding City}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding State}"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Salary}" DataFormatString="{}{0:C2}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>
Chinedu
Top achievements
Rank 1
 answered on 19 Jun 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?