Telerik Forums
UI for WPF Forum
5 answers
273 views
In Telerik's latest release (2011.1.0223) we now have the ability to use a double click event.  Could you please provide me an example showing this.

Thanks!
Petar Mladenov
Telerik team
 answered on 07 Mar 2011
0 answers
68 views
Hi,

I want to pick the selected value from the RadGridViewCombo box drop down and assign it to a textbox.

How can I do this.

Can any one here help me with a sample code to solve this issue.


Thanks in advance.

With Regards,
Hirak

hirak
Top achievements
Rank 1
 asked on 07 Mar 2011
7 answers
90 views
HI,

I have two GridViewComboBox columns in my application & I want to display data in second combo box based on the selection done in combobox1.
In this case the data vanishes once I move out of the comboboxcolumn1 to comboboxcolumn2.

Please, suggest me a quick solution to this issue.

A quick sample code in this regard would highly help me to resolve this issue.

Looking forward to a early reply.

Thanks & Regards,
Hirak
hirak
Top achievements
Rank 1
 answered on 07 Mar 2011
1 answer
227 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
51 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
203 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
398 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
102 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
250 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
132 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?