Telerik Forums
UI for WPF Forum
3 answers
108 views

How can I disable dragover capture on RadTreeListView columns headers in case like example below? I would like to not have impossible drop visual in case of dragging over column headers.

Example:

<telerik:RadTreeListView x:Name="radTreeListView"AutoGenerateColumns="False">
  <telerik:RadTreeListView.ChildTableDefinitions>
    <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}"/>       
  </telerik:RadTreeListView.ChildTableDefinitions>
  <telerik:RadTreeListView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"Header="Name" />
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Count}"Header="Count"  />
    </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>
Stefan Nenchev
Telerik team
 answered on 18 Jan 2017
2 answers
1.0K+ views
I am trying to find a way to get a scroll event from the RadGridView control.  Our requirements want us to display a WebBrowser Control within our row details of the RadGridView.  The issue with this is when the row scrolls up or down outside of the bounds of the grid the browser control remains and will overlay other controls outside of the grid which looks a little odd.  What I would like to do is register for a vertical scroll event so that I can collapse the expended row details to remove the browser control from the view.  Is there a way to get the scroll event.  I tried using ScrollViewerExtensions.GetAttachedVerticalScrollBar to acquire the scroll bar but always get null and I can't see any other way to get an event from the grid view itself.  Any assistance would be greatly appreciated.
Lawrence
Top achievements
Rank 2
Iron
 answered on 17 Jan 2017
2 answers
136 views

Hello,

it is possible integrate the RadChartVIew with RadGridVIew?

Something like this (but using RadChartVIew instead of RadChart): 

http://docs.telerik.com/devtools/wpf/controls/radchart/how-to/integration-with-rad-grid-view

 

My objective is to reload the Chart every time when the RadgridView is filtered. There are someexamples about this topic?

 

Thank you!

Regards

Leo

Carlo
Top achievements
Rank 1
 answered on 17 Jan 2017
3 answers
124 views

Hi, I am successfully able to display the custom merge field(inserts a table into the document) into my RadDocument. The problem I come across is that when I try to save or mail merge I am presented with an error

at Telerik.Windows.Documents.Layout.LayoutBox.InvalidateMeasure()
at Telerik.Windows.Documents.Layout.LayoutBox.InvalidateMeasureUpToTheRoot()
at Telerik.Windows.Documents.Layout.LayoutBox.OnAssociateDocumentElementChangedCore()
at Telerik.Windows.Documents.Layout.LayoutBox.set_AssociatedDocumentElement(DocumentElement value)

Am I doing anything wrong while creating a MergeField? Is the xamlserializer causing the error?

public class CustomMergeField : MergeField
{
    private const string CustomFieldName = "CustomField";
 
    static CustomMergeField()
    {
        CodeBasedFieldFactory.RegisterFieldType(CustomMergeField.CustomFieldName, () => { return new CustomMergeField(); });
    }
 
    public override string FieldTypeName
    {
        get
        {
            return CustomMergeField.CustomFieldName;
        }
    }
 
    public override Field CreateInstance()
    {
        return new CustomMergeField();
    }
     
    protected override DocumentFragment GetResultFragment()
    {
        UniversalDTO universalDTO = this.Document.MailMergeDataSource.CurrentItem as UniversalDTO;
        if (universalDTO == null)
        {
            return null;
        }
 
        if (this.PropertyPath == "Collaterals")
        {
            Table table = new Table();
 
            foreach (var coillateral in universalDTO.Collaterals)
            {
                Span span = new Span(coillateral.Type.Value);
                span.FontSize = 11.5;
                Paragraph paragraph = new Paragraph();
                paragraph.Inlines.Add(span);
 
                Span span2 = new Span(coillateral.Description);
                span2.FontSize = 11.5;
                Paragraph paragraph2 = new Paragraph();
                paragraph2.Inlines.Add(span2);
 
                TableCell cell = new TableCell();
                cell.Blocks.Add(paragraph);
                cell.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent));
 
                TableCell cell2 = new TableCell();
                cell2.Blocks.Add(paragraph2);
                cell2.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent));
 
                TableRow row = new TableRow();
                row.Cells.Add(cell);
                row.Cells.Add(cell2);
                table.AddRow(row);
            }
 
            Section section = new Section();
            section.Blocks.Add(table);
 
            RadDocument document = new RadDocument();
            document.Sections.Add(section);
 
            document.MeasureAndArrangeInDefaultSize();
            return new DocumentFragment(document);
        }
 
        return null;
    }
}
Tanya
Telerik team
 answered on 17 Jan 2017
3 answers
522 views

I have a Floating Radpane (2.gif) and I want this to fit the content inside. Is it possible to make it behave like the 1.gif grid?

What I want is for the width and height to be dynamic depending on the content.

The RadPane structure is as follows:

<telerik:RadDocking x:Name="RadDockingFloating">
    <telerik:RadSplitContainer x:Name="RadSplitContainer" Visibility="Collapsed" telerik:RadDocking.FloatingLocation="500,50"  InitialPosition="FloatingOnly">
        <telerik:RadPaneGroup >
            <telerik:RadPane IsHidden="True" ContextMenuTemplate="{x:Null}" TitleTemplate="{StaticResource TitleTemplate}"  x:Name="TooltipHeader" CanUserPin="False">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="90" />
                        <RowDefinition Height="20" />
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0">
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="OhlcChartTextBlock" />
                    </StackPanel>
                    <Border Grid.Row="1" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel >
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="VolumeChartTextBlock" />
                        </StackPanel>
                    </Border>
                    <Border x:Name="TooltipFloatBorder" Grid.Row="2" Margin="0, 3, 0, 0" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel x:Name="TooltipFloat">
 
                        </StackPanel>
                    </Border>
                    <Border Grid.Row="3" Margin="0, 3, 0, 0" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel>
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="Order"/>
                        </StackPanel>
                    </Border>
                </Grid>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>

Thank you
Gerard.

Stefan Nenchev
Telerik team
 answered on 17 Jan 2017
5 answers
227 views

Hi,

I've written a custom provider (using a custom TileMapSource). I'm using EPSG900913Projection but the tile source I'm using does not have data for the entire world. The first problem I have is that when I first render the map it's using GeoBounds for the entire world. The problem is that I don't statically know the extent of the data source until I load the map, so I can't set the GeoBounds for RadMap and my custom provider in xaml. I've tried hooking event handlers for my user control "Loaded" event, also in RadMap.InitializeCompleted where I've tried to set the GeoBounds for both the RadMap and the custom provider but still the first time the map renders it covers the whole world.

I'd also like to limit the zoom range the user can use i.e. I'd like to stop the user zooming out more than one zoom level from the initial data extent. Again, because the data extent is not statically known I can't set the min and max zoom to fixed values. Is there some way to calculate the zoom level corresponding to the available data extent?

I have wired up a refresh button that when clicked calls RadMap.SetView passing a locationRect that I've constructed from the data available, and that correctly sets the view (and zoom level) for the map.

Can you suggest where I might be going wrong?

Thanks,

Pete

 

Petar Mladenov
Telerik team
 answered on 17 Jan 2017
1 answer
110 views

Hi guys!
I found a problem regarding text size change and following text selection.

These are the minimal steps to replicate the bug:
* Start WPF demo and select RichTextBox demo
* Select first paragraph under "Overview": from "RadRichTextBox is a control" to "bookmarks and comments."
* From the upper toolbar, change font size to 20
* Scroll down to the second paragraph ("The control can preview... tweaking of images."), you will be only able to select words from the first and fourth line but NOT from the second or the third.

The problem disappears immediately after using another format command or if you change the paragraph text. It seems to me that font size change doesn't invoke a document measure/rearrange.

Thanks for your assistance.
Fabrizio Piazza

Tanya
Telerik team
 answered on 17 Jan 2017
1 answer
239 views

Hi

 

I am trying to create my own custom column based on GridViewBoundColumnBase to use with RadGridView.

When using a column like GridViewDataColumn intellisense knows that the Binding in DataMemberBinding uses the context of an item specified in its parents RadGridView's ItemsSource. This gives me the proper suggestions from intellisense to bind to.

With my custom column I am unable to replicate this behavior. I only inherit the datacontext from the parent RadGridView. How can I get around this?

(PS: I need to create a custom column, I do not want to set the DataTemplate of GridViewColumn specifically for every table)

Jan Terje
Top achievements
Rank 1
 answered on 17 Jan 2017
1 answer
237 views
I'd like to load an .xslx file for viewing only. In other words I want to stop the user from adding or changing anything. Is there any way I can set read only?
Dinko | Tech Support Engineer
Telerik team
 answered on 17 Jan 2017
3 answers
350 views

There is a small probability issue:

when in a child thread  call the RadWindow.Alert method  to show a message window 

i use Application.Current.Dispatcher.BeginInvoke to call main thread

 Application.Current.Dispatcher.BeginInvoke((Action)delegate
                {
                    RadWindow.Alert(new DialogParameters { Header = StringResources.GetCodeMessage("TiShi"), Content = "error", Owner = Application.Current.MainWindow });
                });

then there is a NullReferenceException  occur

the exception stack is as following

在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__7(UIElement item)
   在 System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   在 System.Linq.Enumerable.Max(IEnumerable`1 source)
   在 System.Linq.Enumerable.Max[TSource](IEnumerable`1 source, Func`2 selector)
   在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__6(Double total, List`1 next)
   在 System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   在 Telerik.Windows.Controls.Primitives.TabStripPanel.MeasureOverride(Size availableSize)
   在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   在 System.Windows.UIElement.Measure(Size availableSize)
   在 System.Windows.ContextLayoutManager.UpdateLayout()
   在 System.Windows.UIElement.UpdateLayout()
   在 System.Windows.Interop.HwndSource.SetLayoutSize()
   在 System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   在 System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   在 System.Windows.Window.SetRootVisual()
   在 System.Windows.Window.SetRootVisualAndUpdateSTC()
   在 System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   在 System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   在 System.Windows.Window.CreateSourceWindowDuringShow()
   在 System.Windows.Window.SafeCreateWindowDuringShow()
   在 System.Windows.Window.ShowHelper(Object booleanBox)
   在 System.Windows.Window.Show()
   在 System.Windows.Window.ShowDialog()
   在 Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean isModal)
   在 Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
   在 Telerik.Windows.Controls.RadWindow.ShowDialog()
   在 Telerik.Windows.Controls.RadWindow.ConfigureModal(RadAlert content, DialogParameters dialogParams)
   在 Telerik.Windows.Controls.RadWindow.Alert(DialogParameters dialogParameters)
   在 Eurlanda.DataShire.DataShireIDE.MainUserControl.<MainUserControl_Loaded>b__13() 位置 g:\datashire_cloud_IDE\Eurlanda.DataShire.DataShireIDE\MainUserControl.xaml.cs:行号 528
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I have no idea about this  issue  

Is any solution to avoid?

 

Polya
Telerik team
 answered on 17 Jan 2017
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?