Telerik Forums
UI for WPF Forum
2 answers
342 views
Since installing Q2 2011 drag & drop is no longer working in my app?

Could there be a link between these 2 events??

Should I move over to the new dragdrop??
Tsvyatko
Telerik team
 answered on 13 Sep 2011
1 answer
75 views
I am looking to create something where users can setup recurring alerts to remind them of specific tasks, and I was hoping I could use the Appointment and AppointmentDialog to accomplish this.

Do you know if it's possible to use the Appointment and Appointment Dialogs without actually using a ScheduleView? I tried creating and showing a new AppointmentDialog,but it just came up empty.

My other big concern is how I would get the Dates for an Appointment for automated alerts. Is there a way to test if an Appointment lands on a specific date, or to get the Dates from an Appointment?

Thanks
Rosi
Telerik team
 answered on 13 Sep 2011
0 answers
82 views

Hi,

Assume I have fixed number of rows & node structure, and number of columns and columns data would change. When I come back to the screen, it should retain the previous node expand/collapse state.

Is there any way to achieve this functionality?

Thanks,

Suman

suman
Top achievements
Rank 1
 asked on 12 Sep 2011
6 answers
374 views
Hello,
I am using TreeviewList in my WPF appication using MVVM. I want to show all nodes in expanded mode but by default it shows me only parent node. Is there any way to show all nodes (in expanded mode) automatically?
Mark
Top achievements
Rank 1
 answered on 12 Sep 2011
2 answers
174 views
With the WPF Q2 2011 release, the autoscroll for dragging treeview items has stopped working.  I have verified that by modifying your TreeView Drag and Drop example for both Q1 and Q2 releases.  If you give the RadTreeView1 control a Height of 200 ( enabling it to have a scroll bar ) and then drag an item to the bottom of the tree view, it will autoscroll for Q1 release, but does not for the Q2 release.

Please advise.

Troy
Hristo
Telerik team
 answered on 12 Sep 2011
2 answers
424 views
I'm using WPF 4.0, v2011.2.712.40.

I have a grid with two columns that have hyperlink controls in the datatemplate so I can launch to another view within my application when a user clicks on the link.  Periodically the hyperlinks do not trigger the command it is bound to.  If I refresh the list that the grid is bound to then the item with the issue will start to work but sometimes other items stop working.  Here is the column definition.  As you can see from the commented parts of the datatemplate I have also tried using a button but have issues there as well.  If I let the button (or radbutton) look like a regular button without styling it everything seems to work better but if I put a style on it to make it look like a link button the memory usage of my app increases dramatically as the grid is scrolled.

<telerik:GridViewDataColumn Header="Account" DataMemberBinding="{Binding AccountName}" FooterCellStyle="{StaticResource GridNoLinesFooterStyle}">
  <telerik:GridViewDataColumn.CellTemplate>
    <DataTemplate>
      <!--<Button Content="{Binding AccountName}" Command="{Binding DataContext.OpenAccountCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}" 
              CommandParameter="{Binding}"/>-->
      <!--<telerik:RadButton Content="{Binding AccountName}" Command="{Binding DataContext.OpenAccountCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}" CommandParameter="{Binding}" 
                         Style="{StaticResource hyperlinkButtonStyle}" />-->
      <TextBlock>
          <Hyperlink Command="{Binding DataContext.OpenAccountCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}" CommandParameter="{Binding}"
              <TextBlock Text="{Binding AccountName}"></TextBlock>
          </Hyperlink>
      </TextBlock>
    </DataTemplate>
  </telerik:GridViewDataColumn.CellTemplate>
  <telerik:GridViewBoundColumnBase.AggregateFunctions>
    <telerik:CountFunction Caption="Count:" />
  </telerik:GridViewBoundColumnBase.AggregateFunctions>
</telerik:GridViewDataColumn>
Betsy
Top achievements
Rank 1
 answered on 12 Sep 2011
0 answers
133 views
Hi,
I am using context menu in my page. I have defined in following way.

<

 

telerik:RadTreeListView x:Name="rtlvPeopleInfo" >

 

 

 

<!--Context Menu-->

 

 

 

<telerik:RadContextMenu.ContextMenu>

 

 

 

<telerik:RadContextMenu x:Name="radPeopleContextMenu" Opened="radPeopleContextMenu_Opened" >

 

 

 

<telerik:RadMenuItem x:Name="rmiAssign_Engineer" Header="Assign Engineer"/>

 

 

 

</telerik:RadContextMenu>

 

 

 

</telerik:RadContextMenu.ContextMenu>

 

 

 

<telerik:RadTreeListView.Columns>

 

 

 

<telerik:GridViewDataColumn Header="Future Hrs" TextAlignment="Right"/>

 

 

 

<telerik:GridViewDataColumn Header="Previous Hrs" TextAlignment="Right"/>

 

 

 

</telerik:RadTreeListView.Columns>

 

 

 

</telerik:RadTreeListView>

Whenever I normally right click on any cell then it opens correctly and that is fine. But my requirement was if there is any unsaved data on page by cell edit, then when user right click on other cell it should show a message that "User changes will be lost, do u want to continue?". If yes then open the context menu as it is. So when there is any change on page then I show a messagebox with above confirmation message. Now if user selects "Yes" then the context menu opens on the top most left corner of the TreeListView, not on the cell right clicked. Please help me how I will open on same position the user mouse clicked, not the topmost left corner.

So the problem arises only when i open the messagebox confirmation.

 

Manishkumar
Top achievements
Rank 1
 asked on 12 Sep 2011
3 answers
162 views
Do you have an example for row visibility ( show/hide ) achieved by utilizing the filtering approach.

I have two buttons for the TreeListView that a user can click that will
- only show first two levels of tree
 - filter out on a column if cell has data.

Thanks

Jessica
Top achievements
Rank 1
 answered on 12 Sep 2011
8 answers
425 views
Hello,  I have a WPF application that utilizes the MVVM pattern.  On my view is a RadGridView defined as

<telerik:RadGridView Name="grdOrders" Grid.Row="1"
                                 AutoGenerateColumns="False"
                                 ItemsSource="{Binding LineItems}"
                                 SelectedItem="{Binding Path=SelectedLineItem}"
                                 IsSynchronizedWithCurrentItem="True"
                                 IsReadOnly="True"
                                 ClipboardCopyMode="Cells"
                                 RowStyleSelector="{StaticResource backorderStyleSelector}"
                                 ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                 ScrollViewer.VerticalScrollBarVisibility="Auto" MouseDoubleClick="grdOrders_MouseDoubleClick" SelectionMode="Extended">
                                 <i:Interaction.Behaviors>
                    <b:MultiSelectBehavior SelectedItems="{Binding Path=SelectedLineItems}" />
                </i:Interaction.Behaviors>
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=GPPONumber}" Header="GP PO Number" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=LineItemId}" Header="Line Item Id" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Quantity}" Header="Quantity" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=PartNumber}" Header="Part Number" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Description}" Header="Description" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=WarehouseCode}" Header="Warehouse" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=WarehouseBin}" Header="Bin Location" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=ShippingMethod}" Header="Shipping Method" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=VendorName}" Header="Vendor Name" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Salesrep}" Header="Sales Rep" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SourcedBy}" Header="Sourced By" />
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Backordered}" Header="B/O?" />
                </telerik:RadGridView.Columns>
                </telerik:RadGridView>

Corresponding in my ViewModel I have a property

public ObservableCollection<WarehouseLineItemProxy> LineItems
    {
      get
      {
        return lineItems;
      }
      set
      {
        lineItems = value;
        RaisePropertyChanged(() => LineItems);
        ViewOrderInfoCommand.RaiseCanExecuteChanged();
      }
    }

On the View Model is a timer that refreshes the data every 60 seconds

refreshTimer = new DispatcherTimer();
refreshTimer.Interval = TimeSpan.FromSeconds(60);
refreshTimer.Tick += new EventHandler(refreshTimer_Tick);

The tick event and refresh method

/// <summary>
    /// Handles the Tick event of the refreshTimer control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    private void refreshTimer_Tick(object sender, EventArgs e)
    {
      refreshTimer.Stop();
      RefreshLineItems(new object());
      refreshTimer.Start();
    }
 
/// <summary>
    /// Refreshes the line items.
    /// </summary>
    /// <param name="arg">The arg.</param>
    private void RefreshLineItems(object arg)
    {
      if (!worker.IsBusy)
      {
        ShowBusyIndicator = true;
        worker.RunWorkerAsync();
        refreshTimer.Stop();
        refreshTimer.Start();
      }
    }

worker is a BackgroundWorker that allows me to load data asynchronously

/// <summary>
    /// Handles the DoWork event of the worker control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param>
    private void worker_DoWork(object sender, DoWorkEventArgs e)
    {
      e.Result = adapter.LoadWarehouseOrders();
    }
 
/// <summary>
    /// Handles the RunWorkerCompleted event of the worker control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.ComponentModel.RunWorkerCompletedEventArgs"/> instance containing the event data.</param>
    private void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    {
      Dispatcher.CurrentDispatcher.BeginInvoke(new Action<ObservableCollection<WarehouseLineItemProxy>>(this.UpdateGridData), e.Result);
    }   
 
/// <summary>
    /// Updates the grid data.
    /// </summary>
    /// <param name="lineItems">The line items.</param>
    private void UpdateGridData(ObservableCollection<WarehouseLineItemProxy> lineItems)
    {
      LineItems = lineItems;
      ShowBusyIndicator = false;
    }

Occasionally in Production users will get a NullReferenceException at some point when the grid is trying to re-draw.  Here is the stack trace.

at Telerik.Windows.Controls.GridView.Automation.GridViewCellAutomationPeer.GetNameCore() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Automation\GridViewCellAutomationPeer.cs:line 146
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdatePeer(Object arg)
   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.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   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.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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.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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at PartsFinder.Chimera.App.Main() in d:\TeamCityWork\PARTSFinderSlnProd\Chimera\PartsFinder.Chimera\obj\x86\Prod-Warehouse\App.g.cs:line 50

This exception doesn't happen every time, in fact it is very random.  But the users get annoyed when it happens several times during the day.  Does anyone have any ideas?

Thanks
Ivan Ivanov
Telerik team
 answered on 12 Sep 2011
1 answer
170 views
Hi Telerik,
I want to capture the "close" event when the custom scheduler dialog box is closed below (i.e. clicking on the X button), how can I do so?

Thanks, Cheau




        <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="{x:Type telerik:SchedulerDialog}">           

            <Grid VerticalAlignment="Center" Margin="10">

                <Grid.ColumnDefinitions>

                    <ColumnDefinition Width="150"/>

                    <ColumnDefinition/>

                </Grid.ColumnDefinitions>

                <Label Grid.Column="0" Content="Number of Tap Activity" Height="25"/>

                <telerik:RadNumericUpDown Grid.Column="1"  Height="25" Width="50" NumberDecimalDigits="0" ValueFormat="Numeric" HorizontalAlignment="Left"

                                          Value="{Binding Occurrence.Appointment.TapActivityNum, Mode=TwoWay}" />

            </Grid>

        </ControlTemplate>

 

        <Style x:Key="EditAppointmentStyle" TargetType="telerik:SchedulerDialog">

            <Setter Property="Width" Value="250" />

            <Setter Property="Height" Value="100" />

            <Setter Property="IsTabStop" Value="False" />

            <Setter Property="SnapsToDevicePixels" Value="True" />

            <Setter Property="Template" Value="{StaticResource EditAppointmentTemplate}" />

            <Setter Property="HeaderTemplate">

                <Setter.Value>

                    <DataTemplate>

                        <StackPanel Orientation="Horizontal">

                            <TextBlock Text="Number of Tap Activity" />

                        </StackPanel>

                    </DataTemplate>

                </Setter.Value>

            </Setter>

        </Style>


Rosi
Telerik team
 answered on 12 Sep 2011
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?