Telerik Forums
UI for WPF Forum
1 answer
51 views
Hi,

We have to Print RadTreeListView. Please suggest me the best solution. 

We have tried with some samples using creating FixedDocument and using Document Viewer. I am able to see the content in Document Viewer, while printing only Header content alone printed. 

Please suggest the best appraoch to print TreeListView

Thanks
Dimitrina
Telerik team
 answered on 16 Jan 2014
1 answer
136 views
Hi,

We have to Print RadTreeListView. Please suggest me the best solution. 

I have tried with some samples using creating FixedDocument and using Document Viewer. I am able to see the content in Document Viewer, while printing only Header content alone printed. 

Please suggest the best appraoch to print TreeListView

Thanks
Dimitrina
Telerik team
 answered on 16 Jan 2014
1 answer
63 views

Hello,



We are using the RichTextBox to display emails and the emails coming from one of the servers shows the embedded image as 10 x 10 pixels.  If I take the temporary image that was downloaded (and linked to the ImageInline) and send it in another email or open it with an image viewer, it shows up with the proper dimensions.



Thanks,

Wil

Wil
Top achievements
Rank 1
 answered on 15 Jan 2014
1 answer
159 views
Hi,

my need is to store and restore Filter settings.
The scenario - a grid with Names is in a dialog.
The user (for an example) chooses "Joe" in the Firstname Column and "Doe" in the FamilyName column.

Prior closing the Dialog I store the FilterDescriptors like this:
//pFilterDescriptors is the FilterDescriptors collection from RadGridView
//_FilterStore is a local CompositeFilterDescriptorCollection
public void StoreFilter(Telerik.Windows.Data.CompositeFilterDescriptorCollection pFilterDescriptors) {
    if(_FilterStore != null) {
        _FilterStore.Clear();
        foreach(IFilterDescriptor o in pFilterDescriptors) {
            _FilterStore.Add(o);
        }
    }
}

The next time I open the dialog I restore these stored Values like this:
//pFilterDescriptors is the FilterDescriptors collection from RadGridView
//_FilterStore is a local CompositeFilterDescriptorCollection
public void RestoreFilter(Telerik.Windows.Data.CompositeFilterDescriptorCollection pFilterDescriptors) {
    if(pFilterDescriptors != null) {
        pFilterDescriptors.Clear();
        foreach(IFilterDescriptor o in _FilterStore) {
            pFilterDescriptors.Add(o);
        }
    }
}

This works - but when I open the filter box only "Joe" can be found in the distinct values.
"Clear Filter" on the column is also not working since the column nows nothing about filtering.

What I need (expected) is:
   a.) Highlighted Filter Symbols in the filtered columns
   b.) Filtered Values available in the Filter Selector (also those not visible at the moment)

Or in simple Words - the RadGridView should look / work like it did when I closed the dialog.

Manfred
ManniAT
Top achievements
Rank 2
 answered on 15 Jan 2014
1 answer
176 views
Hello,

We have implemented custom insert logic in our grids via the context menu.
However, when there are no items in the grid, the user can't use the context menu so we show the "Click here to insert new row".

Once there's an item in the collection, the "Click here to insert new row" is no longer shown.

We are having problems pinpointing the best location at which to handle this.

We check if the grid doesn't have any items and if the "CanUserInsertRows" property is set to true.
If these conditions both are true, we show the insert new row area, otherwise we hide it:

public void HandleNewRowPosition()
{
    var showNewRow = !GridTreeListHasItems() && Grid.CanUserInsertRows;
    Grid.NewRowPosition = GetInsertNewRowPosition(showNewRow);
}
 
private bool GridTreeListHasItems()
{
    var anyValue = false;
    var x = Grid.ItemsSource as IEnumerable;
    if (x != null)
    {
        anyValue = x.GetEnumerator().MoveNext();
    }
 
    return anyValue;
}
 
private GridViewNewRowPosition GetInsertNewRowPosition(bool show)
{
    var converter = new BooleanToGridViewNewRowPositionConverter();
 
    return (GridViewNewRowPosition)converter.Convert(show, typeof(GridViewNewRowPosition), null, CultureInfo.CurrentUICulture);
}
 
 /// <summary>
/// Converts a boolean to the position of new rows. True corresponds with the top.
/// </summary>
[ValueConversion(typeof(bool), typeof(GridViewNewRowPosition))]
public class BooleanToGridViewNewRowPositionConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        return (bool) value ? GridViewNewRowPosition.Top : GridViewNewRowPosition.None;
    }
 
    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        return (GridViewNewRowPosition) value == GridViewNewRowPosition.Top;
    }
}


I tried adding a value changed callback to the "CanUserInsertRows" dependency property, but it doesn't seem to trigger the callback when I do a Notify property changed on the property which is bound to the "CanUserInsertRows" property of the grid:

_canUserInserRowsPropertyDescriptor = DependencyPropertyDescriptor.FromProperty(GridViewDataControl.CanUserInsertRowsProperty, typeof(GridViewDataControl));
 
if (_canUserInserRowsPropertyDescriptor != null)
{
    _canUserInserRowsPropertyDescriptor.AddValueChanged(this.AssociatedObject, CanUserInserRowsChanged_Handler);
}
 
private void CanUserInserRowsChanged_Handler(object sender, EventArgs e)
{
    HandleNewRowPosition();
}

We used to call the "HandleNewRowPosition" method at several places (eg "OnItemsChanged", "OnLoaded", ...) but we noticed that it got called way to many times when we only expected it once, maybe twice.

Anyone have an idea on how to do this properly?

Hristo
Telerik team
 answered on 15 Jan 2014
3 answers
512 views
The save load layout example is not mvvm. The example uses code behind to call the SaveLayout and LoadLayout on the docking control and it does not use a view model. Where is an example of radDocking save and load layout using no code behind. ?
Vladi
Telerik team
 answered on 15 Jan 2014
1 answer
218 views
I would like to have connections styled depending on the nodes they are connecting.

For example, I have node types A, B.  All connections from A -> A, A -> B, B -> A will be ConnectionStyle1.  All connections for B -> B will be ConnectionStyle2.

I am currently using the MVVM implementation of DiagramGraphSouce and it is working very well.  I am also using StyleSelector for both Connection and Shape.

Attempting this from within the ConnectionStyleSelector does not work as the item.Target is always null (the connection has not been established with the Target yet).

Clearly the easy solution is for ConnectionStyleSelector to be called both BEFORE and AFTER the link is established, allowing me to detect Source and Target are of type B and return the necessary style.  No such luck.

I tried from within DiagramGraphSource.AddLink() which is called after the connection is established.  There are SourceCapType and TargetCapType properties that would fulfill my styling requirement.  Unfortunately, setting these properties does nothing.

Finally I tried using ConnectionManipulationCompleted() where I am able to manipulate the connection ends.  Alas, there is no way to retrieve the VM of the nodes involved in the Source and Target of the connection, so there is no way to tell what node types I'm actually connecting.  

I thought of actually creating a VM for my connections (not just the nodes), but that seems like a lot of effort for something that sounds like it should be very easy to accomplish.

Am I missing something?

Thanks,
Mike
Pavel R. Pavlov
Telerik team
 answered on 15 Jan 2014
3 answers
288 views
Is there any way to change the scroll speed on the RadGridView? Currently one scroll moves 3 rows, we need it to just move 1 row, as our rows are quite big.

thanks.
Yoan
Telerik team
 answered on 15 Jan 2014
1 answer
117 views
Hi,

I have a WeekViewDefinition and when I try to change the GroupHeaderDateStringFormat property in code behind the change doesn't take effect immediatly. The control need an AppointmentsSource before my change can take effect, is this normal???

ie:
                this.ScheduleView.AppointmentsSource = null;
                this.ScheduleView.AppointmentsSource = mSpots;

Thank's
Alain
Kalin
Telerik team
 answered on 15 Jan 2014
2 answers
389 views
Hello,

I am using the newest WPF Controls Examples - Print and Export with RadDocument as a template for my project.

I need to print in US Legal (8.5 x 11) paper size, in landscape orientation and a smaller font using the WPF RadGridView as a source.

I have tried adding the following to the example code to change orientation and page size:
RadDocument.SectionDefaultPageOrientation = PageOrientation.Landscape;
and
RadRichTextBox.Document.SectionDefaultPageOrientation = PageOrientation.Landscape; 
and
Section.PageSize = new Size() { Height = 11.0, Width = 8.5 };
and it does not work.

Also, I have a large amount of text/columns to include in the print so I need to lower my font size to get everything to fit.

I have tried adding the following code to the example to change the printed font size:
RadRichTextBox.FontSize = 5.0; 
and it does not work.

Any help would be most appreciated!

John


Petya
Telerik team
 answered on 15 Jan 2014
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
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?