Telerik Forums
UI for WPF Forum
1 answer
232 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
298 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
122 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
403 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
7 answers
192 views
We have a telerik RadGrid View . Inside the Radgridview data template I have another Rad Grid view which is bidning to a propertey on View Model.

<telerik:RadGridView>
 <telerik:RadGridView.RowStyle><!-Style-> <telerik:RadGridView.RowStyle>
 <telerik:RadGridView.AlternateRowStyle><!-Style-> <telerik:RadGridView.AlternateRowStyle>
 <telerik:RadGridView.RowDetailsTemplate >
    <telerik:RadGridView  ItemsSource="{Binding DataContext.VMPOPERTEY, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" 
                                    AutoGenerateColumns="True"
                                    Name="myGrids" ColumnWidth="Auto" IsReadOnly="True" >
 </telerik:RadGridView.RowDetailsTemplate >
</telerik:RadGridView>


Now the problem is when ever I am expanding an Item , the VMPOPERTEY get set as per the currently expanded item . So the Duplicate values get reflected in all the child elements.

For Example in following figure , when I select Row1 , the row 1 value gets update but the moment I select Row two too (as it expansion mode is multiple) bot Row1 and Row 2 shows the value for Row 2 as this is the last slected row.

Dimitrina
Telerik team
 answered on 15 Jan 2014
1 answer
118 views
Hi Telerik,

In my application I am using telerik:GridViewImageColumn.
My scenario is I am assigning collection to gridview each object row contains the byte array of image. Collection contains more than 1000 rows.  Actually collection is for my company product users. We have few products (say 10).
I am showing those product user details in gridview with product image. Each user row contains product image byte array.
After assigning data source when I scroll the gridview sometimes getting exception “Target invocation exception”

Exception type: TargetInvocationException

Source: mscorlib

-----
-----
------

======== InnerException ========

        Description: The value should not null.

Parametername: uriSource

        Exception type: ArgumentNullException

        Source: PresentationCore

        Stack Trace:

 System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource, RequestCachePolicy uriCachePolicy)

    Telerik.Windows.Controls.GridViewImageColumn.image_ImageFailed(Object sender, 
ExceptionRoutedEventArgs e)


My xaml code for assigning data member is

<telerik:GridViewImageColumn Header=""  UniqueName="colProductImage" DataMemberBinding="{Binding ProductImage}" ImageHeight="20" ImageWidth="20" /> 

What could be the solution for above problem?

My idea is to avoid above problem, instead of loading image byte data for each row just loads all 10 products data in one collection and give the reference to image column with collection index. If it is possible  please tell how to do .

Thanks for help. Naresh Mesineni

Dimitrina
Telerik team
 answered on 15 Jan 2014
1 answer
246 views
Hi,

I have a Togglebutton with an Image in a cell that has a Contexmenu that opens when I Left click on tit. That works fine. But I need to set in code "IsEnable" on the MenuItems, but I can't use the MenuItems name, the code cant see / find the element (The name 'menu1' does not exist in the current context).

I used a Togglebutton since I found that to be the easiest way, what I need is an image that will open an ContexMenu on left click.

This How I code in Xaml

<telerik:GridViewColumn Header="Mode"  Width="60" HeaderTextAlignment="Center">
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
 
                    <ToggleButton Name="btnMode" HorizontalAlignment="Center" IsChecked="{Binding IsOpen, ElementName=menuModes, Mode=TwoWay}" Tag="{Binding Id}" Click="btnMode_Click">
                        <Image Source="{Binding ModeImage}"/>
                        <telerik:RadContextMenu.ContextMenu>
                            <telerik:RadContextMenu Name="menuModes" Placement="Bottom">
                                <telerik:RadMenuItem Header="Menu 1" Tag="{Binding Id}"  Name="menu1" Click="menu1_Click"  />
                                <telerik:RadMenuItem Header="Menu 2" Tag="{Binding Id}" Name="menu2" Click="menu2_Click" />
                                <telerik:RadMenuItem Header="Menu 3" Tag="{Binding Id}" Name="menu3" Click="menu3_Click" />
                            </telerik:RadContextMenu>
                        </telerik:RadContextMenu.ContextMenu>
                    </ToggleButton>
 
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
        </telerik:GridViewColumn>

/Ken
Yoan
Telerik team
 answered on 15 Jan 2014
0 answers
222 views

Hi,

On my application, I'm using a GridView to display some data that I want to drag and drop to ListBox.
The drag and drop operations works fine but when I activated the Windows8Touch theme, I see some problems:
1) I see 1 or two circles when I keep the mouse pressed (or when the user touch the GridView): how can I remove this circles ?
2) To initiate my drag and drop to Listbox, I use the TouchMove event with this code:

var point = e.GetTouchPoint(datagrid).Position;
var element = datagrid.InputHitTest(pointas FrameworkElement;
if (element != null)
{
    var clientVm = element.DataContext as ClientViewModel;
    if (clientVm != null)
    {
        datagrid.CaptureTouch(e.TouchDevice);
 
        DragDropEffects dropEffect = DragDrop.DoDragDrop(datagridclientVmDragDropEffects.Move);
    }
}


On the touch move, i get the item under the touch point and I initiate my drag/drop. I do this because, otherwise, I need to select an item to be able to drop it (and I dont want to select an item, I just want to drag/drop the item I want).
But with that code, I'm no longer able to use the touch event to scroll on the GridView (as soon as I try, the component think I want to perform a Drag/drop operation).

How to solve this 2 problems ?

Thanks!
Thomas LEBRUN
Top achievements
Rank 1
 asked on 15 Jan 2014
10 answers
734 views
Adding a longish text string to the Alert/Prompt/Confirm cuts off the text and you lose the prompt buttons e.g:

Humpty Dumpty sat on a wall. Humpty dumpty had a great fall. All the kings horses and all the kings men couldn't put humpty together again. Jack and Jill went up a hill to fetch a pale of water. Jack fell down and broke his crown


Is there a way to make the text wrap/window height grow?
Chetan
Top achievements
Rank 1
 answered on 15 Jan 2014
1 answer
135 views
Hi,

I am developing a WPF application in my company.
I use RadDocking controls.

A UserControl is displayed in a Pane in the DocumentHost at runtime (see attached file : 1.png).
The UserControl contains a RadGridView with a GridViewImageColumn databound to an object's property which does not exist.
So databinding errors are displayed in the Output window as expected (see attached file : 2.png).

Then I have cleared the Output window.
I have undocked the Pane (see attached file : 3.png).
No databinding errors have been displayed in the Output window as expected (see attached file : 4.png).

Then I have docked the Pane into a right SplitContainer (see attached file : 5.png).
Databinding errors have been displayed in the Output window but I do not understand why (see attached file : 6.png).

Does databinding always occur when docking a Pane ?

Thank you in advance for your help
Kalin
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
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?