Telerik Forums
UI for WPF Forum
1 answer
254 views
Hi,

I am using Telerik Q3 2010, blend 4, vs 2010.

i am using rad gridview  one of the column is Gridviewcombobox column, when i set the ItemContainerStyle of the combobox i am loosing data, when i click the dropdown instead of getting tubelist i am getting the object name. if i comment the ItemContainerStyle its working fine.

 please see the attached image.


<Style  TargetType="telerik:RadComboBox">
        <Setter Property="OpenDropDownOnFocus" Value="True"/>
        <!--<Setter Property="MinHeight" Value="50"/>-->
        <Setter Property="ItemContainerStyle" Value="{DynamicResource RadComboBoxItemStyle1}" />
          
        <Setter Property="MaxDropDownHeight" Value="500" />
          
    </Style>


<Style x:Key="RadComboBoxItemStyle1" TargetType="{x:Type telerik:RadComboBoxItem}">
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadComboBoxItem}">
                        <Border x:Name="Background" BorderBrush="steelblue" BorderThickness="1" Background="{TemplateBinding Background}" Margin="5,2" CornerRadius="2">
                            <Grid>
                                <Rectangle x:Name="Highlight" Visibility="Collapsed">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                                            <GradientStop Color="#FF5F9DD6" />
                                            <GradientStop Color="White" Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" TextElement.Foreground="Black" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" OpacityMask="Black" Margin="2,10" />
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsHighlighted" Value="True">
                                <Setter Property="Visibility" TargetName="Highlight" Value="Visible" />
                                <Setter Property="BorderBrush" TargetName="Background" Value="SteelBlue" />
                                <Setter Property="Background" Value="#FF001720" TargetName="Background" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="HorizontalContentAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Padding" Value="3,1" />
            <Setter Property="SnapsToDevicePixels" Value="True" />
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        </Style>

<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding TubeType}"     
DisplayMemberPath="TubeType"  SelectedValueMemberPath="TubeType"  Header="Tube Type"  
MinWidth="200" EditTriggers="CellClick" />
Maya
Telerik team
 answered on 07 Mar 2011
3 answers
65 views
Hello,

I have used expression dark theme for a rad grid view, the grid displays same icon for both ascending and descending order when sorted.

 Could you please suggest a solution for this.
Milan
Telerik team
 answered on 07 Mar 2011
1 answer
242 views
I'm trying to change the default colour of the header row on the expression dark theme of the grid view. I've edit a copy of the default style, but no matter what colours I change the background remains the same dark grey. I've managed to find and change the colours of the cells that make up the column headings. However there is a section remaining that isn't a column heading, just empty space on the right of all the column headings. Has anyone had any success in changing this default colour? 

The most obviously thing to change would be the value of the background in 

<SolidColorBrush x:Key="GridView_HeaderRowBackground" Color="#FF2D2E32" />

But this has no affect, even if I make it a bright red just as a test. Even attempting to hard code a value in the border has no effect.

<Border x:Name="PART_GridViewHeaderRowBorder" 
Background="Red"
BorderBrush="{TemplateBinding BorderBrush}" 
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="{TemplateBinding Padding}"
Grid.ColumnSpan="4" 
BorderThickness="{TemplateBinding BorderThickness}">
</Border>
Vanya Pavlova
Telerik team
 answered on 07 Mar 2011
3 answers
436 views

Hello

I have a WPF Telerik RadGrid View, in which the row should have different colors based on a boolean. i was able to do this with data triggers, but the problem is that i was unable to disable the mouse over and select effects on the row. as a result, even though a particular row has a different color due to the boolean, when the mouse moves over or when the row is selected, it gets selected/mouse over color effect. is tere a way i can disable the mouse over and selected properties for this particular row. Setting the IsSelected and Focusable properties to false also didnt make any difference. The style and data triggers is as follows:

<Style x:Key="RadRowStyle" TargetType="{x:Type telerik:GridViewRow}"> 
           
<Style.Triggers> 
               
<DataTrigger Binding="{Binding ABC}" Value="True"> 
               
<Setter Property="Background" Value="Blue"/> 
               
<Setter Property="IsSelected" Value="False"/> 
               
<Setter Property="Focusable" Value="False"/> 
               
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> 
           
</DataTrigger> 
           
<DataTrigger Binding="{Binding ABC}" Value="false"> 
               
<Setter Property="Background" Value="Transparent"/> 
           
</DataTrigger> 
       
</Style.Triggers> 
   
</Style> 
Vlad
Telerik team
 answered on 07 Mar 2011
2 answers
126 views

Hello,

I wan to export data asynchronously. During exporting I want to display progress bar.

Here is the code, with is working, but unfortunatelly not asynchronously - my UI is still freezed. I think it's because of Dispatcher. I have to use dispatcher because grid is created in another thread. So even if I created separated thead function grid.Export() is still invoked by main UI thread.

How I can resolve this problem?

ThreadStart start = delegate()
            {
                grid.Dispatcher.Invoke((EventHandler)delegate(object ss, EventArgs ee)
                {
                    grid.Export(ms);
                }, new object[2]);
            };
            new Thread(start).Start();

mariusz piatek
Top achievements
Rank 1
 answered on 07 Mar 2011
2 answers
300 views
Hi,

I have a grid with numeric data that can be edited by the user. If the user enters a non numeric value the edit should be cancelled and the cell value should revert to the original value (skipping validation). When the grid is bound to a DataTable I am able to do this using the CellValidating event as such:

private void OnManualSplitPointsValidating(object sender, GridViewCellValidatingEventArgs e)
        {
            if (Helper.IsNumeric(e.NewValue) == false)
            {
                var grid = (RadGridView) sender;
                grid.CancelEdit();
            }
        }

But when I apply this same code to a CSLA collection the line grid.CancelEdit() causes a row deletion. This may be a problem with the CSLA list but I wanted to check if there is a different way of reverting to the previous value (or if indeed this is supported at all).

I am using the latest Beta and .NET 4.0.

Cheers,
Jose
Jose Simas
Top achievements
Rank 2
 answered on 06 Mar 2011
2 answers
149 views
I'm writing my own custom "export to excel" command for the WPF GridView.  Since I can apply custom styles and want them applied to my exported spreadsheet I need to iterate through all rows / cells and snag not only content but styles.  I can't seem to figure out how to do this (obviously it's set up to allow you to iterate through the underlying data items).  I was thinking about using ChildOfType or something.  Any thoughts?
Yavor Georgiev
Telerik team
 answered on 06 Mar 2011
1 answer
196 views

WPF is all about the user experience. I'm developing a line of business application and need some working examples of a beautiful data entry form.

I'm planning on using a DataGrid and a modal window to add, view and edit records.

Here's an example of a great looking solution for Silverlight, but it's using a Popup control and not a modal window.

(Silverlight example is near bottom of this web page)

Click here for example of great looking data entry form for Silverlight

Yavor Georgiev
Telerik team
 answered on 05 Mar 2011
3 answers
298 views
Hi there, 

Is it possible to use HierarchicalDataTemplate in RadTreeListView? 
Here is the reason for my question above:

I have object structure as shown below:
1. Class A, it has collection of object of type Class B as one of its properties (in the hierarchy, object of type Class B will be Class A object's children)
2. Class B's has collection of object of type Class A as one of its properties and so on.(in the hierarchy, object of type Class A will be Class B object's children)

I notice that in order to use RadTreeListView, parent and children must be in the same type.
This scenario can be achieved using TreeView with two HierarchicalDataTemplate, but the requirement from customer needs column for each node in the tree view (like what RadTreeListView offers). So I'm thinking if we can use HierarchicalDataTemplate in RadTreeListView than we can solve the problem here.

Regards,

arinto

Vlad
Telerik team
 answered on 04 Mar 2011
7 answers
86 views

If RadDocking is docked, how can we force it to be on top of other windows in the application?

When i
set RadDocking as dockable, that time the Raddocking go behind the window. But i want to be on top of  any usecontrols.

Konstantina
Telerik team
 answered on 04 Mar 2011
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?