Telerik Forums
UI for WPF Forum
0 answers
188 views
Hi,

I've loaded a word document into my RadBook which is integrated with a RichTextBox.
Book's FlowDirection property is set to RightToLeft but the text inside the document appears LeftToRight!
In Word, Doc's text is right to left.

Problem is shown is attached image.

Any Idea?
Thanks.
Tooraj
Top achievements
Rank 1
 asked on 17 Dec 2012
0 answers
98 views
Hello!
In my application I'm trying to get data from a RadGridView in my code behind. Everything is ok if I bind the grid directly from entity data model with just a table, because this code works fine:

Example:

Dim idordine As String = DirectCast(testGrid.SelectedItem, Orders).OrderID


In my application I binded my grid with a linq query and my testgrid(radgrid) correctly shows results.
This is a linq query like the one in my project, used to bind my radgrid:

Dim query = From employee In employees Join order In orders On employee.EmployeeID = order.EmployeeID
Select New With { _
    .EmployeeName = employee.LastName, _
    .OrderName = order.ShipName, _
    .OrderDate = order.OrderDate _
}
testGrid.ItemsSource = query
 
 
        Me.Griglia.ItemsSource = qry


My problem raises in code behind when I try to retrieve data of the selected row of my testgrid after a double-click event.
Using the first method I have to assign a type for the directcast, but in case of binding with the query I have no idea of what kind of object to put instead of Orders type.

Any suggestion?

BestRegards



CQT
Top achievements
Rank 1
 asked on 17 Dec 2012
2 answers
259 views

Hi,

Is there an option to use RadCartesianChart with zoom capability on the X axis in a way that when the zoom/pan had changed the Y axis will fit its min and max values automatically?

If not, How can I get which parts of the series is visible on the chart, so I can calculate Y values by myself?

Thanks.

Rotem
Top achievements
Rank 1
 answered on 17 Dec 2012
1 answer
199 views

Dear all,

I want to drag items from one listbox to another. The drag seems to work fine, but the target listbox doesn't get updated with the new item. I do notice that, once dropped, the item is removed from the source list. I try to do stuff declaratively (XAML) as much as I can

Here's the XAML for the enabling of dragging.

<Window.Resources>
        <!-- Make "ViewModel" represent an instance of ViewModel-->
        <local:ViewModel x:Key="ViewModel"/>
        <Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
        </Style>
</Window.Resources>

Here's where I display my listboxes

<Grid x:Name="_grid" HorizontalAlignment="Left" Height="436" Margin="10,10,0,0" VerticalAlignment="Top" Width="1297" DataContext="{Binding Source={StaticResource ViewModel}}">
<telerik:RadListBox HorizontalAlignment="Left" Margin="10,48,0,0" VerticalAlignment="Top" Width="106" Height="306" ItemContainerStyle="{StaticResource DraggableListBoxItem}"
ItemsSource="{Binding Segments.AllSegments}" DisplayMemberPath="Code">
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior />
</telerik:RadListBox.DragDropBehavior>
<telerik:RadListBox.DragVisualProvider>
<telerik:ScreenshotDragVisualProvider />
</telerik:RadListBox.DragVisualProvider>
</telerik:RadListBox>
<telerik:RadListBox HorizontalAlignment="Left" Margin="133,48,0,0" VerticalAlignment="Top" Width="205" Height="306"
ItemsSource="{Binding Segments.SelectedSegments}" DisplayMemberPath="Code" AllowDrop="True">
</telerik:RadListBox>
</grid>
</Window>

For your information: My main ViewModel exposes another viewmodel called Segments which has 2 ObservableCollection<> properties, called AllSegments and SelectedSegments. Both contain the same data type (a viewmodel called Segment).

I was under the impression that I can implement this d&d fully declaratively, since there's no need for data conversion. (Both viewmodels accept the same data type). But the SelectedSegments ObservableCollection is never updated when I drop an item on the target listbox. What am I missing here?

Thanks for responding.

Regards,
~Rob 

Vladi
Telerik team
 answered on 17 Dec 2012
1 answer
113 views
Hi All,

I have gridView and I want to change the color of filtered column indicator icon (see attachment). The default indicator color cannot be seen easily. I want to change it to some bright color so that the user can see it easily.

Any kind of help is appreciated.
Ivan Ivanov
Telerik team
 answered on 17 Dec 2012
3 answers
67 views
I'm using a TransitionControl that transitions to a view which uses a RadialGauge with a RadialScale that has IsInteractive set to True. Whenever I load that view, a COMException is thrown with HRESULT 0x88980406. Seems to be related to bitmap rendering in some capacity. The exception is one that appears to be a known bug in .Net, but previous versions of RadControls haven't had this issue.

Andrey
Telerik team
 answered on 17 Dec 2012
3 answers
167 views
I'm creating all columns dynamically in code.  I"m creating groups but the groups are not being rendered. This logic seems to make sense, am I missing something?

_dataGrid.Columns.Clear();
            _dataGrid.ColumnGroups.Clear();
            foreach (var period in currentPeriods)
            {
 
                var periodGroupName = "test" + col;
                var periodGroup = new GridViewColumnGroup {Header = period.Name, Name = periodGroupName};
 
                var runGroupName = "test2" + col;
                var runGroup = new GridViewColumnGroup { Header = "Run", Name = runGroupName };
 
                periodGroup.ChildGroups.Add(runGroup);
 
                _dataGrid.ColumnGroups.Add(periodGroup);
 
                var origColumn = new GridViewDataColumn
                    {
                        ColumnGroupName = periodGroupName,
                        Header = "Orig",
                        DataMemberBinding = new Binding("OriginalValue")
                    };
 
                _dataGrid.Columns.Add(origColumn);
 
                var repeatColumn = new GridViewDataColumn
                {
                    ColumnGroupName = periodGroupName,
                    Header = "Repeat",
                    DataMemberBinding = new Binding("RepeatValue")
                };
 
                _dataGrid.Columns.Add(repeatColumn)
 
                col += 2;
            }
Yoan
Telerik team
 answered on 17 Dec 2012
6 answers
351 views
How can set the ItemSource to DataTable, or have no plans to do so?
Rosen Vladimirov
Telerik team
 answered on 17 Dec 2012
9 answers
165 views
Hello,

I am struggling with the notion of SelectionAnchor which seems to keep some instances even if there are no objects selected. I don't understand how and when they are chosen or released.

Can you tell me how I can release an anchorSelectionItem in code behind?

Thanks
Igor
Top achievements
Rank 2
 answered on 17 Dec 2012
1 answer
77 views

I´m setting up a RadGridView in my WPF application. I´ve already created a database and connected a data source to my Grid. I want the user to be able to edit the entries in the RadGridView and I want the database to update according the that.

How is that possible ?

here is my code:

<Window x:Class="TheHomeApp.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" 
    Height="780" 
    Width="1012" 
    xmlns:my="clr-namespace:TheHomeApp" 
    Loaded="Window_Loaded" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls">

<Window.Resources>
    <my:HeimilisAppidDBDataSet x:Key="heimilisAppidDBDataSet" />
    <CollectionViewSource x:Key="accountingViewSource" Source="{Binding Path=Accounting, Source={StaticResource heimilisAppidDBDataSet}}" />
</Window.Resources>


<Grid DataContext="{StaticResource accountingViewSource}">
    <telerik:RadGridView x:Name="AccountingGridView" GroupRenderMode="Flat"
                         ShowGroupPanel="False"
                         ItemsSource="{Binding}"
                         MinHeight="386"                           
                         IsReadOnly="False"
                         MaxHeight="700" CanUserFreezeColumns="False"
                         RowIndicatorVisibility="Collapsed"
                         AutoGenerateColumns="False"                          
                         ShowColumnFooters="True" 
                         Margin="12,29,0,12" 
                         HorizontalAlignment="Left"
                         Width="452"
                         telerikControls:StyleManager.Theme="Windows8"
                         GridLinesVisibility="Both"
                         ValidatesOnDataErrors="None"
                         >

        <telerik:RadGridView.Columns >
            <telerik:GridViewDataColumn Header="Liður"
                                        DataMemberBinding="{Binding nameAccounting}"
                                        Width="150" />
            <telerik:GridViewDataColumn Header="Áætluð upphæð"
                                        DataMemberBinding="{Binding amountAccounting}"
                                        Width="150"
                                        DataFormatString="{}{0:C}"/>                                           
            <telerik:GridViewDataColumn Header="Raunupphæð"
                                        DataMemberBinding="{Binding actualAmountAccounting}"
                                        DataFormatString="{}{0:C}"
                                        Width="*" />

        </telerik:RadGridView.Columns>

    </telerik:RadGridView>
    <telerik:RadChart Content="{Binding}" Height="288" HorizontalAlignment="Left" Margin="506,42,0,0" Name="accountingRadChart" VerticalAlignment="Top" Width="457" />
</Grid>
Vlad
Telerik team
 answered on 17 Dec 2012
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?