Telerik Forums
UI for WPF Forum
1 answer
135 views

Hi,

I'm trying to apply the RowReorderBehavior (example xaml-sdk) in a hierarchical-gridview and wondering how to enable to childgrid for drah-and-drop.

 <controls:GridView
          x:Name="GridView"
          ItemsSource="{Binding Items}">
          <telerik:RadGridView.ChildTableDefinitions>
            <telerik:GridViewTableDefinition />
          </telerik:RadGridView.ChildTableDefinitions>
          <telerik:RadGridView.HierarchyChildTemplate>
            <DataTemplate>
              <controls:GridView
                x:Name="ChildGrid"
                AllowDrop="True"
                Drop="UIElement_OnDrop"
                ItemsSource="{Binding InvoiceLines}"
                RowIndicatorVisibility="Visible"
                SelectedItem="{Binding CurrentChild, Mode=TwoWay}">
                <controls:GridView.Resources>
                  <DataTemplate x:Key="DraggedItemTemplate">
                    <StackPanel>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Dragging:" />
                        <TextBlock FontWeight="Bold" Text="{Binding CurrentDraggedItem}" />
                      </StackPanel>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock
                          MinWidth="45"
                          FontWeight="Bold"
                          Text="{Binding CurrentDropPosition}" />
                        <TextBlock Foreground="Gray" Text=", (" />
                        <TextBlock Text="{Binding CurrentDraggedOverItem}" />
                        <TextBlock Foreground="Gray" Text=")" />
                      </StackPanel>
                    </StackPanel>
                  </DataTemplate>
                </controls:GridView.Resources>
                <controls:GridView.RowStyle>
                  <Style TargetType="telerik:GridViewRow">
                    <Setter Property="telerik:DragDropManager.AllowDrag" Value="True" />
                    <Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold" />
                  </Style>
                </controls:GridView.RowStyle>

 

in the code behind is want to enable the childgrid like: RowReorderBehavior.SetIsEnabled(childgrid, isEnabled);

My problem is how to find the dependencyobject for the childgrid. Trying something like this...

this.GridView.HierarchyChildTemplate.FindName("ChildGrid", ????)

JKattestaart
Top achievements
Rank 1
 answered on 15 Feb 2018
5 answers
1.0K+ views
I am trying to bind a dynamically generated menu. I have set up the following style:


<
Style x:Key="MenuItemStyle" TargetType="telerik:RadMenuItem">
        <Setter Property="Header" Value="{Binding Header}" />
        <Setter Property="IsCheckable" Value="{Binding IsCheckable}" />
         
        <Setter Property="IsSeparator" Value="{Binding IsSeparator}" />
        <Setter Property="IsChecked" Value="{Binding IsChecked}" />
        <Setter Property="Icon" Value="{Binding IconUrl}" />
         
        <Setter Property="ItemsSource" Value="{Binding SubMenuItems}" />
        <Setter Property="Command" Value="{Binding MenuItemClicked}" />
        <Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}" />
      
        <Setter Property="IconTemplate" >
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{Binding}" Stretch="Fill"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
 
    </Style>
</Window.Resources>
This Generates the menus just fine and they appear exactly as I expect HOWEVER the command does nothing ()i.e. the MENUCLICKED. I have set up the command MenuItemClicked in the ViewModel and correct instantiated it as an ICOMMAND but it never fires the command. What am I missing??. The command is set up as follows:
public ICommand MenuItemClicked { get; set; }
 
MenuItemClicked = new Command<RadMenuItem>(c =>
          {
              ....executesomeciodec);
          });
 I must have missed something but for the life of me I cannot see what. I know it is bound correctly as the menus are getting populated with the correct properties, icons and layouts.

Please advise - thank you


​
Vladimir Stoyanov
Telerik team
 answered on 14 Feb 2018
1 answer
100 views

Hi Progress Telerik,

I have selected an GanttTask in GanttView. The selection is OK. But while exporting the whole GanttArea it is showing with different Task Selection. Please find the attachment for a clear understanding and kindly provide me the solution. I have used the below code which is available in https://github.com/telerik/xaml-sdk/tree/master/GanttView/PrintingAndExporting

 

var exportSettings = new ImageExportSettings(new Size(816, 1056), true, GanttArea.AllAreas);

using (var export = ganttView.ExportingService.BeginExporting(exportSettings))
{
    exportImages = export.ImageInfos.ToList().Select(info => info.Export());
}

 

Thanks and Regards,

Muhammad Azhar Shah

MSC Technology

Martin Ivanov
Telerik team
 answered on 14 Feb 2018
1 answer
230 views

I am getting a null reference exception whenever assigning to the RadPdfViewer FixedDocumentPresenter property. The last line of code below is where an exception is thrown. I have also tried to set the FixedDocumentPresenter property by using pdfViewer.GetRegisteredPresenter(), but I get the same exception. I need the presenter to be set so I can get coordinates of the PDF but the value is null.

            pdfViewer = new RadPdfViewer();
            string pdfFilePath = "C:\\temp\\GeneratedDocument.pdf";
            MemoryStream stream = new MemoryStream();
            using (Stream input = File.OpenRead(pdfFilePath))
            {
                input.CopyTo(stream);
            }
            FormatProviderSettings settings = new FormatProviderSettings(ReadingMode.OnDemand);
            PdfFormatProvider provider = new PdfFormatProvider(stream, settings);
            RadFixedDocument doc = provider.Import();
            pdfViewer.Document = doc;
            pdfViewer.MouseDoubleClick += PdfViewer_MouseDoubleClick;

            var myPresenter = new FixedDocumentSinglePageViewPresenter();
            pdfViewer.FixedDocumentPresenter = myPresenter;

 

EXCEPTION:Error Message: Object reference not set to an instance of an object.

   at Telerik.Windows.Controls.FixedDocumentViewerBase.InitializeFixedDocumentPresenter(IFixedDocumentPresenter releasedPresenter, IFixedDocumentPresenter presenter)
   at Telerik.Windows.Controls.FixedDocumentViewerBase.set_FixedDocumentPresenter(IFixedDocumentPresenter value)

 

Polya
Telerik team
 answered on 14 Feb 2018
1 answer
127 views
Is there a way to customize FilterControls on a per column basis?

Thanks in advance,
Steve 
Martin
Telerik team
 answered on 14 Feb 2018
2 answers
115 views

Would it be possible to reorder the columns by dragging as in the GridView?

Thanks in advance,
Steve

Martin
Telerik team
 answered on 14 Feb 2018
1 answer
657 views

Hi!

I have RadGridView, and I need to get Header cell for all columns. How to get header cells (not content) in RadGridView.

Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Feb 2018
3 answers
200 views

Hello,

I am new to both XAML and Telerik. I am trying to implement some functionality to an existing application that will allow me to drag and drop a tree node item to a data grid. I have been looking at the example here (https://github.com/telerik/xaml-sdk/tree/master/TreeView/DragDropTreeViewToControls) and it seems very similar to what I need except a data grid instead of a list box. It should behave in the following way:

1) Allow drag and drop of tree node items ONLY to the left column cell(s) of an adjacent data grid (the other column will be prepopulated with data)

2) DISABLE drap and drop (and reorder, etc) within the RadTreeView itself.

 

If possible, please attach an example solution in a zip file.

Thank you in advance.

Bardon
Top achievements
Rank 1
 answered on 14 Feb 2018
1 answer
629 views

Hello,

we've an issue with the fluent theme (and material theme also). 
As example the pin button has a wrong style. See attached screen shot.

How can we fix this problem?

Version: 2018.1.122.145.

Thanx

Markus

Martin
Telerik team
 answered on 14 Feb 2018
9 answers
426 views
Hello,

can you please show an example of how to change the speed of transition animation when it is enabled for the extender control(telerik:AnimationManager.IsAnimationEnabled="True")

Thank you
Sia
Telerik team
 answered on 14 Feb 2018
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
DataPager
PersistenceFramework
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?