Telerik Forums
UI for WPF Forum
3 answers
91 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
81 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
248 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
112 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
2 answers
114 views
Can someone provide me with a list of the predefined styles for the NumericIndicator control?  The only ones I can find that work are TemplatePrefix="HexagonalSevenSegs" and TemplatePrefix="SevenSegs".  I am using the Q3 2009 WPF RadControls.  I have viewed some other posts that reference SummerSevenSegs but this style doesn't work for me.


Thanks!
Larry
Top achievements
Rank 1
 answered on 23 Nov 2009
3 answers
145 views
Hi,

Does RadChart for WPF support logarithmic scales for the axis? I searched but all I can find are references to the ASP.NET chart and the Gauge.

Thanks,
Jose
Giuseppe
Telerik team
 answered on 23 Nov 2009
6 answers
167 views
I liked scroll indicator from ScrollModes example with pictures.

What I would like to do is this:
I would like to have RealTime scroll mode for my grid, but when scrolling I would like to show information about item (picture, name) in a control next to the grid view and not in a tooltip (like in Deffered mode). I could not find events which could help me do that.

Thank you for the help ;)

Milan
Telerik team
 answered on 23 Nov 2009
1 answer
44 views
hi

i updated to q3 version of wpf controls. i understand that rowappearance has been removed from q3, but i was using it in my code.
please can anyone tell me with what shud i replace rowappearance.

now i am unable to build my application because of the issue. it will be very helpful to have it in the documentation how should such deletions be handled.

thanks,
sandy
Milan
Telerik team
 answered on 20 Nov 2009
8 answers
627 views
Hi!

There is any way to show a different color for even and odd rows?

Thanks!
Rodney Foley
Top achievements
Rank 1
 answered on 20 Nov 2009
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
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Iron
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
Iron
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?