Telerik Forums
UI for WPF Forum
1 answer
620 views
I have been searching for a while now and have not come up with solution to a feature I need to implement.

I have set the background color for multiple columns in my RadGridView to be bound to a user's selection. For example, if they select option 1, the first column will be highlighted. If they select option 2, the second column is highlighted, and the highlight from the first column is removed. I currently have the style for the column set up as follows:

<telerik:GridViewColumn.Style>
    <Style BasedOn="{StaticResource CommonColumnStyle}" TargetType="{x:Type telerik:GridViewColumn}">
        <Style.Triggers>
            <DataTrigger Value="True">
                <DataTrigger.Binding>
                    <MultiBinding Converter="{StaticResource ColumnIsSelectedConverter}" ConverterParameter="0">
                        <Binding ElementName="LayoutRoot" Path="DataContext.AllowedOptions" />
                        <Binding ElementName="LayoutRoot" Path="DataContext.SelectedOptions" />
                    </MultiBinding>
                </DataTrigger.Binding>
                <Setter Property="Background" Value="{DynamicResource ColumnHighlightColor}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
</telerik:GridViewColumn.Style>

The CommonColumnStyle just defines text alignment, trimming, and a default background of transparent. The ColumnIsSelectedConverter returns true or false. The ViewModel contains an IList of options that are displayed to the user in the order that they also appear in the grid. This lets me use the ConverterParameter to specify that this is the nth column in the XAML.

There are two problems with this implementation:

  1. I'm also defining footers for these columns. The first column's data cells and footer start with the ColumnHighlightColor. If the user changes the selected option, the data cell backgrounds update, but the footer background does not change. (e.g. first column returns to transparent, second column is now highlighted, but the first column's footer is still highlighted and the second footer is transparent.) I was able to get around this by defining a style/triggers for the footer cells as well, but I don't think that should be necessary. I'm curious if this is by design or a bug.

  2. The column background only appears for rows with data and in the footer row, not the unoccupied rows. We have our GridView set to fill up most of the screen, so we would like the column background to show up from the top of the GridView to the bottom. Is there a way around this?

Thanks!
Maya
Telerik team
 answered on 28 Sep 2012
1 answer
223 views
Is there any way that I can do that?
Petar Kirov
Telerik team
 answered on 27 Sep 2012
1 answer
189 views
We have a RadGridView with a Hierarchical RadGridView in a template.
We bind the selected item of the Hierarchical grid to an object in our ViewModel. (with PropertyChanged...).

When we change the object in our ViewModel, the expected row in de Hierarchical grid is not selected.

Is there a way to select an item in a Hierarchical grid from codebehind?.

Dimitrina
Telerik team
 answered on 27 Sep 2012
1 answer
198 views
I'm working on a project about Persian spell checker in the C# language. I have googled it and found some alternatives, but non of them draw "Wavy line" under misspelled words. for example I try to use Telerik RadRichTextBox and set my Application's Culture to "fa-IR" then load Persian Dictionary but It draw "Wavy Line" under any word (even correct English words) Except Persian Word. So I want to know, How can I draw wavy line under a certain word?
Vasil
Telerik team
 answered on 27 Sep 2012
3 answers
165 views
Hi,

We are getting errors related to DataQueryService class when we construct a QueryableDataServiceCollectionView instance from a WCFDataServices 5.0 DataServicesContext and DataServiceQuery.The application is complaining about the WCF DataService 4.0 assembly (System.Data.Services.Client.dll) !!!

The errors occurred after we ported the application from (WPF4.0 + WCFDataServices 4.0 + EF4.3) to (WPF4.5 + WCFDataServices 5.0 + EF5.0).

I saw an earlier reply from Telerik team that QueryableDataServiceCollectionView is not supported with WCF Data Services October 2011 CTP.Does this also apply to WCF DataServices 5.0 which is an offical version ??.



Environment:

VS 2012 Ultimate
NET 4.5
EF 5.0
WCF Data Services 5.0
WPF 4.5
Telerik WPF 2012.2 912

Thanks in advance

Madani


Rossen Hristov
Telerik team
 answered on 27 Sep 2012
1 answer
166 views
Hi, currently i am constructing a DataTemplate for OutlookbarItem as following using a ListView displaying a list of my ViewModel (LHSBrowseItem which contains a list of items i like to display inside a listview)

<DataTemplate x:Key="dtOutlookBarItem" DataType="LocalViewModel:LHSBrowseItem">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBox Name="tboxTelerik"  Visibility="{Binding Path=AllowSearch, Converter={StaticResource converterBoolVisibility}}">
                </TextBox>
                <LocalControls:ucSpinnerSwirl x:Name="lhsProgressBar" Grid.Row="1" HorizontalAlignment="Center" Margin="5" Visibility="{Binding Path=CollectionLoaded, Converter={StaticResource  converterBoolVisibilityRvs}}"/>
                <ListView Name="lstViewTelerik" Grid.Row="1" 
                          ItemsSource="{Binding Path=Items}"
                          IsSynchronizedWithCurrentItem="True"
                          Visibility="{Binding Path=CollectionLoaded, Converter={StaticResource  converterBoolVisibility}}"
                          SelectionChanged="ListView_SelectionChanged">
                <ListView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel></VirtualizingStackPanel>
                    </ItemsPanelTemplate>
                </ListView.ItemsPanel>
                    <ListView.ItemTemplate>
                        <DataTemplate DataType="LocalViewModel:LHSItem">
                            <TextBlock Text="{Binding Path=Label}"/>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
           </Grid>
        </DataTemplate>


However, i encounter problems when the listview items size is around 5000:

(1) When i minimize and then maximize the outlookbar, the maximizing takes around 2-3 seconds before the windows shows and become reponsive

(2) Same thing happens when i try to resize the main window, it will "hangs " for 2-3 secs before i can operate the outlook bar

To me, it seems that the inside the outlookbar is redrawing itself whenever there is a change. 

[Additional Information]

My style for this outlook bar is as following, 
<DataTemplate x:Key="dtOutlookBarDropdown" >
    <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="30" />
                <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
            <Image Grid.Column="0"
                   Width="20"
                   HorizontalAlignment="left"
                   Source="{Binding SmallIcon}" />
            <Label Grid.Column="1"
                   HorizontalAlignment="Center"
                   Content="{Binding Header}" />
    </Grid>
</DataTemplate>
 
<Style TargetType="{x:Type TelerikNavigation:RadOutlookBar}">
    <Setter Property="Width" Value="220"/>
    <Setter Property="IsVerticalResizerVisible" Value="False"/> 
    <Setter Property="ItemDropDownContentTemplate" Value="{StaticResource dtOutlookBarDropdown}"/>             
</Style
<Style TargetType="{x:Type TelerikNavigation:RadOutlookBarItem}">
    <Setter Property="Title" Value="{Binding Header}"/>
    <Setter Property="Header" Value="{Binding Header}"/>
    <Setter Property="FontWeight" Value="Bold"/>
    <Setter Property="Icon" Value="{Binding LargeIcon}"/>
    <Setter Property="SmallIcon" Value="{Binding SmallIcon}"/>
    <Setter Property="ToolTip" Value="{Binding Header}"/>
    <Setter Property="ContentTemplate" Value="{StaticResource dtOutlookBarItem}"/>           
</Style>

One strange thing i notice is that when outlookbar item with 5k listview items is shown, somehow it also affects another tab control performance, it makes the tab switching quite slow, it pause around 1 sec before the tab switches to other tab and when the outlookbar is minimized, the problem is gone.

your help will be appreciated. Btw, we have purchased your official license. :) 

Can u help regarding this?

thanks a lot

   
Hristo
Telerik team
 answered on 27 Sep 2012
3 answers
174 views
Hi,
i need to change at run time the culture of all controls used in my application, but i've a RadTimeBar's localization problem.

I've try to use the solution posted by Evgenia in the "TimeBar Localization does not work - please help" thread with a button that set the French culture on click, but it doesn't work for me.

My code behind is:

        private void btn_Click(object sender, RoutedEventArgs e)
        {
            CultureInfo culture = new CultureInfo("fr");
            System.Threading.Thread.CurrentThread.CurrentCulture = culture;
            System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
        }

The only way to change the language of RadTimeBar's labels is to destroy and recreate the RadTimeBar on windows loaded, because nothing changes if i only set the Culture.

I'm using Q3-2011 version, there's any other solution for this problem?

Thanks,

Rob
Tsvetie
Telerik team
 answered on 27 Sep 2012
5 answers
698 views
hi,

i'm using the newest Verison of RadCrontrols for WPF. The ItemSource of my gridView is a MVVM (ObservableCollection<Paketdata>).

I my codebehind i run through all the Items in GridView:
var itemsSource = UebersichtDataGrd.ItemsSource as IEnumerable;           
 foreach (Paketdata item in itemsSource)
 {
      if (!string.IsNullOrEmpty(item.Modul))
      {
           // SET Backgroundcolor of GridView row
      }        
}

How do i set the Backgroundcolor of the GridViewRow in this case?
Thanks
Best Regards
Rene
Nagendra
Top achievements
Rank 1
 answered on 27 Sep 2012
1 answer
233 views
Hi.
the problem im facing is that i try to use RadRichTextbox as a document designer. It works perfect for wordlike documents but what i need is to get WSIWG designer of HTML or XAML. I need to put comboboxes (<select> tag for html), textboxes into that document.
and this tag is just skipped during loading into RadDocument. Is there a workaround to this or maybe should i use some other controls? Thanks in advance for any ideas.

Greetings
Maciek
Mihail
Telerik team
 answered on 27 Sep 2012
1 answer
116 views
I have a bug with Autorange = true. The line and bubbles are not in a line! (fail autorange.png )
If I load it again (autorange_small.png ) its working but with very strange autorange.

If i calculate the Y-Axis by my self, there is no problem!

Have you ever seen anything like this? 

thanks
Petar Kirov
Telerik team
 answered on 27 Sep 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?