Telerik Forums
UI for WPF Forum
2 answers
77 views
Hello,

I have a problem with RadGridView inside RadTabItem - same as in this your example (WpfApplication3.zip). RadGridView on 3rd RadTabItem has no items before you select it.

Try to change your code:
public MainWindow()
{
    InitializeComponent();
    this.radGridView1.ItemsSource = GenerateProducts();
    this.radGridView2.ItemsSource = GenerateProducts();
    MessageBox.Show(radGridView1.Items.Count.ToString());
    MessageBox.Show(radGridView2.Items.Count.ToString());
}

There are 19 items in radGridView1 in 1st RadTabItem, but radGridView2 in 3rd RadTabItem has 0 items. In my project I have same problem with version 2011.3.1220.35 and 2012.1.0326.35 too. With previous version used in my project (2010.3.1110.35) it works fine.

Can you help me, please?


Thanks,
Maros 
Dimitrina
Telerik team
 answered on 15 May 2012
1 answer
152 views
i'm using RadScheduleview to implement an application for managing project timeline and resources.
the problem is i want to modify the time ruler to have Start time @ 08:30 and End time @ 20:30 (our daily work time) for each day in the scheduleview, aslo i need to suppress the WeekEnd days and the day off.

please if any solution
thank u
Yana
Telerik team
 answered on 15 May 2012
1 answer
86 views
Is there a way to know which RadTreeViewItem that has just brought to view?
Hristo
Telerik team
 answered on 15 May 2012
1 answer
400 views
Hello,
I'm using RadMenu in an MVVM Caliburn Micro application,I've also a RadDocking that contains my views ... some views are sistem views and they should be enabled/disabled by a menu called Views...I've got difficulties since if I just use the menu (check/unchek) for showing/hiding it work fine, but if I start closing from the "X" I got the IsChecked desinked with the real view state.... since I use this this piece of code for the RadMenu, where do I specify the SubmenuOpened event? If I'm able to access it I can calculate the state of the views...

<UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="booleanConverter" />
        <selectors:MenuItemTemplateSelector x:Key="templateSelector"></selectors:MenuItemTemplateSelector>
        <HierarchicalDataTemplate x:Key="MenuItemTemplate" ItemsSource="{Binding Items}">
            <TextBlock Text="{Binding Text}" cal:Action.TargetWithoutContext="{Binding}"
                 Visibility="{Binding IsVisible,Mode=TwoWay,Converter={StaticResource booleanConverter}}" />
        </HierarchicalDataTemplate>
 
        
 
 
    </UserControl.Resources>
    <Grid>
        <telerik:RadMenu  x:Name="MenuList" ClickToOpen="False"  BorderBrush="Transparent" ItemsSource="{Binding Items}" ItemTemplate="{StaticResource MenuItemTemplate}"  
                     cal:Message.Attach="[Event ItemClick] = [Action OpenView($eventArgs)]"  >
            <telerik:RadMenu.ItemContainerStyle>
                <Style TargetType="telerik:RadMenuItem">
                    <Setter Property="IsSeparator" Value="{Binding IsSeparator}" />
                    <Setter Property="IsChecked" Value="{Binding IsChecked, Mode=TwoWay}" />
                    <Setter Property="IsCheckable" Value="{Binding IsCheckable}" />
                    <Setter Property="StaysOpenOnClick" Value="{Binding IsCheckable}" />
                </Style>
            </telerik:RadMenu.ItemContainerStyle>
 
        </telerik:RadMenu>
    </Grid>
</UserControl>


Thanks
Hristo
Telerik team
 answered on 15 May 2012
1 answer
89 views
Hi,
I have two queries:
1. I have a requirement where i need to put company logo along with chart. And if i m exporting this chart in any format logo should be there with exported chart.
Is it possible with RadChart control?
2.  I need a run time edit window for rad chart control so that user can customize the chart according to changed requirement at any point of time. Is any such kind of functionality available with chart control?

Please see attached images for more clarity on both the point.
Petar Marchev
Telerik team
 answered on 15 May 2012
1 answer
105 views

Hi there,

We have identified a bug with the RadPane/RadDocking control's maximize functionality, which we would appreciate your feedback on as soon as possible.

When maximizing a floating RadPane on a secondary display that has a resolution greater (1920*1200) than that of the primary display (1600*1200) the RadPane is not sized to the extent of the display, but extends beyond it.  This is only the case when the resolutions of the displays are setup in this way; if the primary screen has the greater resolution it does not occur.  Unfortunately this is a usual setup for laptop users who have a large display available when they are working in the office.

 

However, we have resolved this issue (or very similar) in the past in some of our own window management code, so may be able to offer a potential resolution.  We experienced the same symptoms in our custom windows as a result of using a WindowStyle of None and then using Win32 interop to set the minmaxinfo appropriately to avoid overlapping the Windows TaskBar.  The calculations for some reason became invalid in the scenario described above.  The solution implemented was simply not to adjust the minmaxinfo when the window was found to be not on the primary screen.

 

Looking forward to your feedback,

Chris


George
Telerik team
 answered on 15 May 2012
4 answers
186 views
I have a StackPanel within a GridView with its InputBindings set to LeftDoubleClick as shown below.

<TelerikGW:RadGridView x:Name="radGridView" Grid.Row="2"
ItemsSource="{Binding SearchResult.Results}"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
MinWidth="50"
HorizontalAlignment="Stretch"
>
<TelerikGW:RadGridView.Columns>
<TelerikGW:GridViewDataColumn Width="*" MinWidth="50">
<TelerikGW:GridViewDataColumn.Header>
<Label Content="Found" />
</TelerikGW:GridViewDataColumn.Header>
<TelerikGW:GridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Margin="0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Orientation="Horizontal"
>
<StackPanel.InputBindings>
<MouseBinding Command="{Binding Path=ResultClick}" MouseAction="LeftDoubleClick" />
</StackPanel.InputBindings>
<Image Height="20"
MaxWidth="100"
Margin="0"
Source="{Binding ClassIcon.ContentBytes}"
Stretch="Uniform" />
<WV:TextHighLighter Margin="10"
ToolTip="{Binding ResultItem.MatchTerm}"
Padding="0"
Text="{Binding Path=ResultItem.MatchTerm}"
TextToHighLight="{Binding DataContext.SearchedTerm, RelativeSource={RelativeSource AncestorType=WV:GlobalSearch}}" />
</StackPanel>
</DataTemplate>
</TelerikGW:GridViewColumn.CellTemplate>
</TelerikGW:GridViewDataColumn>
</TelerikGW:RadGridView.Columns>
</TelerikGW:RadGridView>


At runtime, on double cicking it throws the following exception.

[System.InvalidCastException] = {"Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.FrameworkElement'."}
 
Message = "Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.FrameworkElement'."
 
Source = "Telerik.Windows.Controls.GridView"
 
StackTrace = "   at Telerik.Windows.Controls.GridView.GridViewRow.ShouldHandleMouseDoubleClick(MouseButtonEventArgs e)\r\n   at Telerik.Windows.Controls.GridView.GridViewRow.OnMouseDoubleClick(MouseButtonEventArgs e)\r\n   at System.Windows.Controls.Control.HandleDouble...

It works if the MouseAction is set to LeftClick, which I don't want to use.

It had worked with 2011-Q3.

Can someone get back with a solution for this please?

Best Regards,

Gajan





Vlad
Telerik team
 answered on 15 May 2012
0 answers
84 views
Sir,
 I am having a gridview with gridviewselectedcolumn. And have set mode of gridview as multiple.
Now I want to use a for loop to check which rows are selected how is it possible because there is no such proerty to check for eg radgridview.Items(0).IsSelected=True can u pls give me the alternative code.

Thanks & Regards,
Utkarsh Ashtekar
Utkarsh
Top achievements
Rank 1
 asked on 15 May 2012
1 answer
130 views
Good evening,

This may be a bit of a noob question but how does one interact with RadDocumentPane from a main window?

Let me detail my Situation.

My main window contains a RadDockingControl. The RadDockingControl has an area for a DocumentHost.
<telerikDocking:RadDocking.DocumentHost>
    <telerikDocking:RadSplitContainer>
        <telerikDocking:RadPaneGroup x:Name="radDockingDocumentHost" />
    </telerikDocking:RadSplitContainer>
</telerikDocking:RadDocking.DocumentHost>

In Code Behind I programmatically add RadDocumentPanes to the DocumentHost whenever a button is pressed.
private void btnBlankNewOrder_Click(object sender, RoutedEventArgs e)
{
    //ADD NEW DOCUMENT PANE _ RadRichTextBox
    var pane = new RadRichTextBoxAutoComplete(products);
    pane.Title = "Rob's Test Pane";
    radDockingDocumentHost.Items.Add(pane);
}

The RadDocumentPanes being added are a modified UseControl which now inherits the RadDocumentPane.
<telerik:RadDocumentPane x:Class="TAS2.RadRichTextBoxAutoComplete"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
             xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d">
 
.................MY CONTROL CONTENT HERE (Cut Out for this Example) ...................
 
</telerik:RadDocumentPane>

Each RadDocumentPane hosts a Grid (actually there are nested Grids which have been cut out for this example) that contain a RadRichTextBox.
<telerik:RadDocumentPane x:Class="TAS2.RadRichTextBoxAutoComplete" ..... >
          <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                 
                <!-- RichTextBox -->
                <telerik:RadRichTextBox x:Name="radRichTextBox" AcceptsReturn="True" Width="800" Margin="10" Padding="10" Grid.Column="0"
                                        FontSize="14" IsSpellCheckingEnabled="False" DocumentInheritsDefaultStyleSettings="True" />
          </Grid>
</telerik:RadDocumentPane>

Going back to my Main Window that contains the main RadDocking control, I have a Ribbon menu containing several buttons (see the attached image).

How do I interact with the programatically added RadDocumentPanes and their respective RichTextBox's when pressing a button in the Ribbon menu?

For example, suppose that the ribbon bar contains a "Paste" button. How do I make the "Paste" command associate itself with the RichTextBox of the current DocumentPane in view?

I would attach samples of my code but it won't let me add them, only images.

Thank you for your time,

All help is appreciated.
Robert
Top achievements
Rank 1
 answered on 15 May 2012
6 answers
219 views

Hello,

I am using Telerik version 2012.1.326
I have a RadGridView, and I am using the ToExcelML() method provided (see code below). The problem is that all of the data is converted into strings by the method. The data comes out of a datatable as strings, decimals, and datetimes. And it is shown in the grid view as it's given datatype. You can filter the columns, and the filter also respects datatype. How do I keep the data as it's original datatype when it is exported?

Thank you,
Eli


            SaveFileDialog dialog = new SaveFileDialog();
            string extension = "xml";
            dialog.InitialDirectory = Settings.Default.DataSavePath;
            dialog.DefaultExt = extension;
            dialog.Filter = string.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "ExcelML");
            dialog.FilterIndex = 1;

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                var gridOutput = this.radGridView.ToExcelML().Replace("Worksheet1", "Output");

                using (Stream stream = dialog.OpenFile())
                {
                    byte[] bytes = Encoding.UTF8.GetBytes(gridOutput);
                    stream.Write(bytes, 0, bytes.Length);
                }

Eli
Top achievements
Rank 1
 answered on 14 May 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
Book
FileDialogs
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?