Telerik Forums
UI for WPF Forum
3 answers
165 views
Hi,

I'm facing the following problem:

I've created a new WPF Control Library containing Rad TabControl which is referenced (and used in ElementHost) in a Windows Forms Controls Library which is registered as Type Library (ActiveX).

When testing the Type Library with tstcon32 I get the following exception inside the WPF Control Library:

"{"'Telerik.Windows.Controls.Navigation;Component/Themes/GenericVista.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. '/Telerik.Windows.Controls.Navigation;component/themes/vista/CarouselDataFieldPresenter.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Object reference not set to an instance of an object.  Error at object 'System.Windows.ResourceDictionary' in markup file 'Telerik.Windows.Controls.Navigation;Component/Themes/GenericVista.xaml'.  Error at object 'System.Windows.ResourceDictionary'."}"

When using the Windows Forms Controls Libary inside another WinForms application everything works fine.

Using the Telerik Calendar the way described above everything works fine.

Alex
JigneshGN
Top achievements
Rank 2
 answered on 24 Nov 2009
6 answers
140 views
We are trying to move to Q3.  We have been using the Telerik theme.  As it is no longer supported we're trying to create a theme that is similar.  However all existing examples that I've found are not compatible with Q3.  They either work in Q1 or Q2.  Has anyone created a somewhat similar theme to the Telerik one? Or could some one post Generic and Resource xamls for one of the supported theme that we could tweak? 

Too bad the old Telerik and Caramel themes were dropped.  They had a nice distintive and stylish look instead the old boring plain Windows style grids.
Kalin Milanov
Telerik team
 answered on 24 Nov 2009
1 answer
101 views
when WindowState="Maximized"
somtimes the RadMenu
when i click on it's items they aren't shown,
it's like the menu is opened but the popup is shown behind the Window

but my window has TopMost="False"

i'm using the Wpf Q3 2009 trial
please tell me how can i solve this


thanks
Kaloyan
Telerik team
 answered on 24 Nov 2009
1 answer
110 views
Hi All,

We we're getting an 'ObservableCollection during a CollectionChanged' error today when we updated our UI from the DB on data changed. We'd not got the error with Q2 or beta for Q3.
I've downloaded the latest build (20th Nov), and the problem has gone away. I didn't see anything in the change log releated to this, so just letting you know.

Cheers Tony
Vlad
Telerik team
 answered on 24 Nov 2009
5 answers
111 views
Hello
How can I set a MaxLength property to a column in the grid
Thanks
Vlad
Telerik team
 answered on 24 Nov 2009
4 answers
193 views
In 2009 Q2 we were using following code to iterate through GridRows in order to collect all rows:

 

 

 
  public IEnumerable GetSelectedRecords  
        {  
            get 
            {  
                 
                List<object> selectedRecords = new List<object>();  
                IList<GridViewRow> rows = EmployeeGridView.ChildrenOfType<GridViewRow>();  
                int index = 0;  
                foreach (GridViewRow row in rows)  
                {  
                 if (!(row is GridViewNewRow) && !(row is GridViewHeaderRow))  
                    {  
                        CheckBox checkBox = row.Cells[0].ChildrenOfType<CheckBox>().FirstOrDefault();  
                        if (checkBox != null && checkBox.IsChecked == true)  
                        {  
                            selectedRecords.Add(row.Item);  
                        }  
                    }  
 


and rows above contained all records in the Grid. Now with Q3 it contains only visible rows. Can this behaviour be overridden in some way ? Or is there a new way to do the same operation ?

Thanks and regards,

Ivan

 

TSRG - IT
Top achievements
Rank 1
 answered on 24 Nov 2009
3 answers
82 views
Hello Telerik,

My requirement is very simple for your grid view but still I am not able to fulfill it. Here I am presenting my problem:

In grid control in one column I just want display image as per my field value in data table column. I am using converter class for that.

Here  i am putting my code:

Here is first xaml file for user control:

<UserControl x:Class="UC_A1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"    
    xmlns:s="clr-namespace:WpfDrugApp"
    Height="300">
    <UserControl.Resources>
        <Style x:Key="IFrameworkInputElementStyle1" x:Name="ImageCell" TargetType="{x:Type IFrameworkInputElement}" />
        <s:ImageConverter x:Key="sColorConverter"></s:ImageConverter>
        <DataTemplate x:Key="GridViewCell" >
            <!--<Image Source="{Binding InteractionType,Converter={StaticResource sColorConverter}}"></Image>-->
            <StackPanel Orientation="Horizontal"  >
                <Image Source="{Binding Path=InteractionType, Converter={StaticResource sColorConverter}, Mode=OneWay}"></Image>
                <TextBlock Text="{Binding Path=InteractionType}"></TextBlock>
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>
    <Grid>

        <telerik:RadGridView x:Name="radGridView" AutoGenerateColumns="False" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding InteractionType}" Header="InteractionType"  UniqueName="InteractionType" CellTemplate="{StaticResource GridViewCell}"  >
                    
                </telerik:GridViewDataColumn>

                <telerik:GridViewDataColumn  DataMemberBinding="{Binding Severity}" Header="Severity"  UniqueName="Severity" />
                <telerik:GridViewDataColumn   DataMemberBinding="{Binding Message}" Header="Message" UniqueName="Message" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>
 
and the code for vb file:

Private Sub UC_A1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
    
        Dim dt As New DataTable
        dt.Columns.Add("InteractionType")
        dt.Columns.Add("Severity")
        dt.Columns.Add("Message")
        Dim objR As DataRow = dt.NewRow
        objR.Item(0) = "1.jpeg"
        objR.Item(1) = "2"
        objR.Item(2) = "Moderate Drug Interaction between furosemide 20 mg oral tablet and enalapril 2.5 mg oral tablet"
        dt.Rows.Add(objR)

        radGridView.ItemsSource = dt
    End Sub

and code for converter class:
Public NotInheritable Class ImageConverter
    Implements IValueConverter


    Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
        Try
            'Return New BitmapImage(New Uri(DirectCast(value, String)))
            Return "/WpfDrugApp;component/1.jpeg"

            'Return New BitmapImage(New Uri("D:\Jignesh Parmar\Testing\Multum\WPFDrugApp\WpfDrugApp\WpfDrugApp\bin\Debug\1.jpeg"))
        Catch
            Return New BitmapImage()
        End Try

    End Function

    Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack

        Throw New NotImplementedException()
    End Function

End Class

So can you provide me solution for that.....

plz reply as soon as possible.
parag patel
Top achievements
Rank 1
 answered on 24 Nov 2009
1 answer
75 views
Hi.
I have form as show below.
<telerik:RadDocking x:Name="Docking"
        <telerik:RadDocking.DocumentHost> 
            <telerik:RadSplitContainer InitialPosition="FloatingDockable"
                <telerik:RadPaneGroup x:Name="DocumentGroup"
                        <telerik:RadPane Header="Pane1"></telerik:RadPane> 
                </telerik:RadPaneGroup> 
        </telerik:RadSplitContainer> 
   </telerik:RadDocking.DocumentHost> 
</telerik:RadDocking> 
How can i supress save layout for pane1? (Saving all exept Pane1)
Miroslav Nedyalkov
Telerik team
 answered on 23 Nov 2009
5 answers
231 views
Hi, there

I want to change Datepicker's MonthView Header,
 I am trying to change background of contentcontrol but it doesn't make any changes to my control. I could find proper property to change. If someone could help me ? Thanks in advance.

 <RadInput:RadDatePicker.MonthViewStyle>
                    <Style TargetType="RadControl:CalendarView">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="RadControl:CalendarView" >
                                        <Grid Background="White">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <ContentControl  Visibility="{TemplateBinding HeaderVisibility}" 
                                            Content="{TemplateBinding Header}" 
                                            Foreground="Black"  
                                            TextBlock.TextAlignment="Center"
                                            Margin="0 2 0 2" />

                                        <!--Alternate rows and highlight -->
                                        <Grid Grid.Row="1">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="*" />
                                                <RowDefinition Height="6*" />
                                            </Grid.RowDefinitions>

                                            <Border  
                                                BorderBrush="Black" 
                                                BorderThickness="0 0 0 1" 
                                                Background="Blue" />
                                        </Grid>
                                        <ItemsPresenter Grid.Row="1"  />
                                        </Grid>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </RadInput:RadDatePicker.MonthViewStyle>

Miroslav Nedyalkov
Telerik team
 answered on 23 Nov 2009
1 answer
100 views
Hi,

I've got data that's natively row based, instead of column based. Ie, each of my records is a column, consisting of a consistent set of rows. Is it possible to work with this sort of data from a GridView?

I also need to be able to freeze both rows and columns (and at the same time), but can only spot information about freezing columns. Is this something that is possible to do?

Or should I anicipate spending a lot of time creating my own grid from WPF primitives instead?


Thanks
Hristo
Telerik team
 answered on 23 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?