Telerik Forums
UI for WPF Forum
1 answer
101 views
Hi 

I have developed a small screen ruler control.  The purpose was to help team members to design UI that conforms to golden ratio.  My boss and teammates think it is very cool and suggest I share it with the community.

I am not sure if I am allowed to share it somewhere.  If you guys are interested to publish it,  I am happy to send you the code as well.


Cheers

Bill
Yana
Telerik team
 answered on 21 Mar 2014
3 answers
133 views
When I click on the empty space on the scroll bar on a grid that has frozen columns, it scrolls too far, so you skip some columns every time you click-scroll.  I think it's skipping the width of the frozen columns.  
Yoan
Telerik team
 answered on 21 Mar 2014
6 answers
1.2K+ views
Setting row color based on cell value data trigger doesn't work with custom theme/style.

   We used to be able to have this Data Trigger work and it still does if we were to use any of the pre-packaged themes.  However we have developed our theme/style and now this data trigger no longer works for setting a row's background color.  We are using alternate row color so I fail to see how to apply the possible Converter strategy as an alternate solution that I've seen in other posts.

 

 

<telerik:RadGridView Height="200" Width="545" Name="gvNoteList" Grid.Row="1" Grid.Column="1" RowStyle="{StaticResource GridViewRowStyle}" AlternateRowStyle="{StaticResource GridViewAlternateRowStyle}" Style="{StaticResource GridReadOnly}" SelectionChanged="gvNoteList_SelectionChanged">

 

 

 

<telerik:RadGridView.Resources>

 

 

 

<Style TargetType="{x:Type telerik:GridViewRow}">

 

 

 

<Style.Triggers>

 

 

 

<DataTrigger Binding="{Binding Path=IsSticky}" Value="True">

 

 

 

<DataTrigger.Setters>

 

 

 

<Setter Property="Background" Value="#FFFF80" />

 

 

 

<Setter Property="Foreground" Value="#000000" />

 

 

 

<Setter Property="FontSize" Value="12" />

 

 

 

</DataTrigger.Setters>

 

 

 

</DataTrigger>

 

 

 

</Style.Triggers>

 

 

 

</Style>

 

 

 

</telerik:RadGridView.Resources>

 

 

 

</telerik:RadGridView>

 

Yoan
Telerik team
 answered on 21 Mar 2014
2 answers
184 views
I have the following data structure in my view model:

ViewModel{
    List of ClientInfos
}

ClientInfos{
    double HourlyRate
    List of ProjectInfos
}

ProjectInfos{
    TimeSpan TimeSpent
    List of WorkItems
}

After much playing around, I have managed to reflect this structure in the UI using a GridView, two child table relations alongside HierachicalChildTemplates as detailed below:

<telerik:RadGridView x:Name="gridView" AutoGenerateColumns="False" IsReadOnly="True" ItemsSource="{Binding ClientInfos}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Client" />
            </telerik:RadGridView.Columns>            
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition  />
            </telerik:RadGridView.ChildTableDefinitions>
            
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView x:Name="ProjectList" ShowGroupPanel="False" IsFilteringAllowed="False" CanUserSortColumns="False" CanUserFreezeColumns="False" AutoGenerateColumns="False" ItemsSource="{Binding Projects}">
                        <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Project" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding WorkingHours}" Header="Day length (hr)" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding DailyRate}" Header="Day Rate" DataFormatString="{}{0:F}" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding HourlyRate}" Header="Hourly Rate" DataFormatString="{}{0:F}" />
                        </telerik:RadGridView.Columns>

                        <telerik:RadGridView.ChildTableDefinitions>
                            <telerik:GridViewTableDefinition  />
                        </telerik:RadGridView.ChildTableDefinitions>

                        <telerik:RadGridView.HierarchyChildTemplate>
                            <DataTemplate>
                                <telerik:RadGridView x:Name="WorkItemList" ShowGroupPanel="False" IsFilteringAllowed="False" CanUserSortColumns="False" CanUserFreezeColumns="False" AutoGenerateColumns="False" ItemsSource="{Binding WorkItems}">
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Work Item" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding DateLogged}" Header="Logged" DataFormatString="{}{0:dd/MM/yyyy}" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding TimeSpent}" Header="Time Spent" />
                                        <telerik:GridViewExpressionColumn Header="Total value in stock" UniqueName="TotalValue" Expression="???" />
                                    </telerik:RadGridView.Columns>
                                </telerik:RadGridView>
                            </DataTemplate>
                        </telerik:RadGridView.HierarchyChildTemplate>

                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>


The issue I am querying here is associated with the second child table responsible for listing the "WorkItems" within the rows "Projects" collection.   I desire a column in the work items child table which lists the financial value of that work item.  This is calculated by taking the "HourlyRate" property which is stored in the associated item for the WorkItem entity and multiplying that by the TimeSpent property value on the WorkItem entity.

My question is what is the syntax I must use in the Expression property of this expression column?  I am using an MVVM architecture so a pure-xaml solution is preferable.  I am not invested in the idea of using the child relation table setup so if anyone has any better ideas on how to represent this hierarchical data on the UI, im all ears.

Thank you for your time and effort.


Nick
Telerik team
 answered on 21 Mar 2014
3 answers
172 views

Hi,

In a self-referencing radgridview, I wanted to completely eliminate the vertical scroll bars for the child records only when a row in the grid is expanded. Is this possible ? what about the case, when the child records are fetched dynamically at run time, when the parent row is expanded by user click ?

Thanks,
Atul

Nick
Telerik team
 answered on 21 Mar 2014
1 answer
192 views
Hello

I have a simple question:

How can I keep the textbox close to the label after resizing the dataform?

Check the attached image where Im showing 3 situations:

1. The label and the textbox before resizing the form.
2. I resize the form, and the textbox is resized but also moved away from the label.
3. The way I wait my textbox to look like, despite the resized form, it is still in the same position.

I have tried many things, but none solved my problem.
Maurício
Top achievements
Rank 1
 answered on 21 Mar 2014
1 answer
143 views
Hi,

I am learning to use the Telerik tools and would like to do the following:

I have a collection of viewmodels I would like to link to the RadOutlookbar, the collection is structured as this
OutLookItems collection
  Element1 (header, title)
    subElement1(title, viewmodel1)
    subElement2(title, viewmodel2)
  Element2 (header, title)
    subElement3(title, viewmodel3)
    subElement4(title, viewmodel4)

I managed to link the main level (Element1, Element2) to the RadOutlookbar and I can see them on the screen.
But I fail to link the second level the a RadListbox that I defined as contenttemplate  in the RadOutlookbar.

What I need to add to get this working?

Johan
 
Boris
Telerik team
 answered on 21 Mar 2014
3 answers
135 views
Is that a new property for the Q1, 2014 release? 
Thanks - Mitch
Petar Marchev
Telerik team
 answered on 21 Mar 2014
5 answers
342 views
Good day,
       I had a Silverlight demo project build on top of prism illustrating UI composition.
       One of the key members of my demo was a TabControl with a region which gets populated OnDemand.

       I've migrated the project to use Telerik controls and one change I made was switching from TabControl to RadTabControl (I am using Telerik controls vs 2011.1.315.1040) and now a couple of things that worked before stopped working now.
  • For the TabItem.ItemContainerStyle I had the following setting:
     
    <Setter Property="HeaderTemplate">
           <Setter.Value>
               <!--Display the child view name on the tab header-->
               <DataTemplate>                       
                   <!--for some reason this does not work with radTabControl-->
                   <TextBlock Text="{Binding ViewName}" />
               </DataTemplate>
           </Setter.Value>
       </Setter>
    Now when I create new tabs in the TabControl they will have no name -> ugly and not what I wanted. How can I get the ViewName to show up in the TabItem?
  • I populated the TabControl with the following code
    Dim lReg As IRegion = Me.mRegionManager.Regions("RequestsTabReqion")
    Dim lRqViewID As String = CommonDefinitions.Constants.BuildRqViewName(iRqId)
    Dim lInfoCardsView As RequestDetailsView = TryCast(lReg.GetView(lRqViewID), RequestDetailsView)
    If lInfoCardsView Is Nothing Then
       lInfoCardsView = New RequestDetailsView()
       Dim lRegMan1 As IRegionManager = lReg.Add(lInfoCardsView, lRqViewID, True)
       lInfoCardsView.SetRegionManager(lRegMan1)
       lInfoCardsView.PopulateWithInfoCards()
       mRegionManager.Regions("RequestsTabReqion").Activate(lInfoCardsView)
    Else
       mRegionManager.Regions("RequestsTabReqion").Activate(lInfoCardsView)
    End If
    Which correctly inserted the tabItem and navigated to the correct tab.
    With the RadTabControl the tab is created but the content area associated to the Tab is not shown. Also the repositioning on the correct tab no longer works.
    How can I get this to work with the RadTabControl?

The RadTabControl code I use:
<telerik:RadTabControl Grid.Row="1" AutomationProperties.AutomationId="RequestTabView"  DropDownDisplayMode="Visible" Margin="2,2,2,2"
                        prism:RegionManager.RegionName="RequestsTabReqion" BackgroundVisibility="Collapsed"
                        prism:RegionManager.RegionContext="{Binding CurrentEmployee}" TabStripPlacement="Top"  BorderThickness="3" BorderBrush="#FF6B43A9" Background="{x:Null}" >
</telerik:RadTabControl>

Any help would be greatly appreciated.
Thanks in advance,
Dragos
Tina Stancheva
Telerik team
 answered on 20 Mar 2014
1 answer
145 views
Hi, I'm trying to pass a list into GridView. It always display the correct number of rows according to the list I pass in, but all cells are blank. Any idea why this is so?

<telerik:RadGridView x:Name="gridCommsEqp" CanUserDeleteRows="False" ItemsSource ="{Binding}" AutoGenerateColumns="False" CanUserInsertRows="False" IsSynchronizedWithCurrentItem="True" ColumnWidth ="Auto" Width ="500" Margin="488,23,62,262" CanUserResizeRows="True" IsReadOnly="True" MouseDoubleClick="gridCommsEqp_MouseDoubleClick">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SSN}" Header="SSN" UniqueName="SSN" TextWrapping="Wrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Description}" Header="Description" UniqueName="Description" TextWrapping="Wrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CurrentQty}" Header="CurrentQty" UniqueName="CurrentQty" TextWrapping="Wrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=TotalQty}" Header="TotalQty" UniqueName="TotalQty" TextWrapping="Wrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Assemblage}" Header="Assemblage" UniqueName="Assemblage" TextWrapping="Wrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=UI}" Header="UI" UniqueName="UI" TextWrapping="Wrap"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

Dictionary<string, List<CommsEqp>> sd = new Dictionary<string, List<CommsEqp>>();
            sd = issueAdapt.getAllCommsEqp();
            gridCommsEqp.DataContext = sd["nonSetEquips"];
        }
//gridCommsEqp.DataContext = issueAdapt.getAllCommsEqp().DefaultView.Table;



Above are my codes. The last line, which is the commented codes, works if I get "issueAdapt.getAllCommsEqp()" to return a DataTable.

Hristo
Telerik team
 answered on 20 Mar 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?