Telerik Forums
UI for WPF Forum
2 answers
248 views
Hi,
I'm trying to change the color for the header.
I can change the GridViewHeaderCell background but the GridViewHeaderRow remains the same (OfficeBlack Theme).
Can you tell me what's wrong.

Thanks

   Maximilien

 

 

 

<Window.Resources>

 

 

 

 

<LinearGradientBrush x:Key="GridViewHeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">

 

 

 

 

<GradientStop Color="Blue" Offset="0"/>

 

 

 

 

<GradientStop Color="Red" Offset="1"/>

 

 

 

 

<GradientStop Color="Green" Offset="0.4"/>

 

 

 

 

<GradientStop Color="Yellow" Offset="0.4"/>

 

 

 

 

</LinearGradientBrush>

 

 

 

 

<Style x:Name="GridViewHeaderCellStyle" TargetType="telerik:GridViewHeaderCell" >

 

 

 

 

<Setter Property="Background" Value="{StaticResource GridViewHeaderBackground}" />

 

 

 

 

<Setter Property="BorderBrush" Value="#FFF40505"/>

 

 

 

 

</Style>

 

 

 

 

<ControlTemplate x:Key="GridViewHeaderRowTemplate" TargetType="telerik:GridViewHeaderRow">

 

 

 

 

<Border x:Name="PART_GridViewHeaderRowBorder" SnapsToDevicePixels="True" Background="{StaticResource GridViewHeaderBackground}">

 

 

 

 

<Grid>

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

<ColumnDefinition Width="Auto" />

 

 

 

 

<ColumnDefinition Width="Auto" />

 

 

 

 

<ColumnDefinition Width="Auto" />

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

<Border BorderBrush="#FFEEEEEE" Grid.ColumnSpan="3" BorderThickness="0,0,0,1" SnapsToDevicePixels="True" Background="{StaticResource GridViewHeaderBackground}" />

 

 

 

 

<telerik:IndicatorPresenter x:Name="PART_IndicatorPresenter" Grid.Column="0" />

 

 

 

 

<telerik:IndentPresenter x:Name="PART_IndentPresenter" Grid.Column="1" />

 

 

 

 

<telerik:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="2" />

 

 

 

 

</Grid>

 

 

 

 

</Border>

 

 

 

 

</ControlTemplate>

 

 

 

 


<
Style x:Name="GridViewHeaderRowStyle" TargetType="telerik:GridViewHeaderRow">

 

 

 

 

<Setter Property="Template" Value="{StaticResource GridViewHeaderRowTemplate}" />

 

 

 

 

<Setter Property="Background" Value="{StaticResource GridViewHeaderBackground}" />

 

 

 

 

<Setter Property="BorderBrush" Value="#FFF40505"/>

 

 

 

 

</Style>

 

 

 

 

 

</Window.Resources>

 

 

 

 



<
Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

 

 

 

 

<telerikGrid:RadGridView x:Name="radGridView" >

 

 

 

 

<telerikGrid:RadGridView.Columns>

 

 

 

 

<telerikGrid:GridViewDataColumn Header="Film" >

 

 

 

 

<telerikGrid:GridViewDataColumn.CellTemplate >

 

 

 

 

<DataTemplate>

 

 

 

 

<TextBlock FontWeight="Bold" FontSize="18" Text="{Binding FilmNumber}" />

 

 

 

 

</DataTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn>

 

 

 

 

<telerikGrid:GridViewDataColumn Header="Regiment" >

 

 

 

 

<telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

<DataTemplate>

 

 

 

 

<TextBlock FontWeight="Bold" FontSize="18" Text="{Binding RegimentNumber}" />

 

 

 

 

</DataTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn>

 

 

 

 

<telerikGrid:GridViewDataColumn Header="Date" >

 

 

 

 

<telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

<DataTemplate>

 

 

 

 

<TextBlock FontWeight="Bold" FontSize="18" Text="{Binding InfractionDate, StringFormat=d}" />

 

 

 

 

</DataTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn.CellTemplate>

 

 

 

 

</telerikGrid:GridViewDataColumn>

 

 

 

 

</telerikGrid:RadGridView.Columns>

 

 

 

 

</telerikGrid:RadGridView>

 

 

 

 

 

</Grid>

 

Madovi
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
96 views
I am working on a project currently where I need to be able to bind a combobox column to a list of classes, and I am unable to get the data to display. I had this working in Winforms but for the life of me, I can't get it to work in WPF.

Here is what I have so far.

List<OrganizationNameType> orgTypeList = new List<OrganizationNameType>();
            orgTypeList = hub.OrganizationNameType.ToList();
 
            Telerik.Windows.Controls.GridViewComboBoxColumn gvc = new Telerik.Windows.Controls.GridViewComboBoxColumn();
            gvc.Header = "New Data Types";
            gvc.ItemsSource = orgTypeList;
            gvc.DisplayMemberPath = "TypeName";
            gvc.SelectedValueMemberPath = "TypeName";

In the class OrganizationNameType I am trying to recover the variable "TypeName" of each OrganizationNameType and have it displayed as a column in my RadGrid.

Any ideas/help would be much appreciated.

Thanks!
Erik Van Norstrand

Erik Van Norstrand
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
147 views
Hi,

a) how can i disable resizing of floating window?
b) Docking to only selected position like top. Don't want left, right, bottom position for floating panel.

Thanks,
Pravesh
Konstantina
Telerik team
 answered on 02 Sep 2010
2 answers
140 views
Hi Telerik Team,

I'm using a WPF form with telerik rad controls which is displayed in Outlook's custom Folder.
The form and control works fine on the machines with Windows XP, Outlook 2007 and .NET 3.5 SP1.
But the same form makes outlook to hang and crash when the RadComboBox is clicked to drop down, in some machines where Windows 7, Outlook 2007 and .NET 3.5 SP1 are installed. At first we thought that this might be the issue with .NET Framework in Win 7 (which is the beta version) so we updated the framework to 3.5 SP1 (3.5.30729) by installing SQL Express 2008 (Since Windows 7 does not allows direct updat of .NET Framework 3.5). But after that also, the WPF form crashes outlook. The combo box control is operative using keyboard but when we drop down using mouse then the application hangs. I then created a sample WPF standalone application with various rad combo controls and similar controls with drop down actions such as calendar, date picker etc. Every thing works fine in the stand alone applications. The only difference between the form used in Outlook and Stand alone application is, the combo box is bound to static data source in stand alone where as it is dynamic in Outlook Forms.

I'm very confused about the issue, whether the error is caused by OS or Outlook 2007 or .Net Framework.
OS : Win 7 Enterprise x64 Bit version.

Can you please suggest me on this ?

thanks in advance,
Yenkay
Robert
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
114 views

Hi!

I'm very interested to know how to do to make tab be styled like VS2005 or VS2008 as you show figured in help in ms-help://telerik.windows.controls/telerik.windows.controls.tabcontrol/radtabcontrol-getting-started.html.

I'll appreciate any sample

thanks

Dimitrina
Telerik team
 answered on 02 Sep 2010
5 answers
123 views
Hi,
I am searching a possibility to synchronize an external Texbox (in a 2-way manner, entries in the Textbox should appear in a selected cell and vice-versa) with a gridcell selected by an user.

Thank you,
Juergen.
juergen
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
119 views
Hi,

I'm comparing the original Office 2007 style with the style applied to Toolbar and there is a minor difference. The expander for toolbar is gray in Telerik controls but blue in Outlook 2007. Please take a look to attached image as a reference.

Thank you,
Ruben
Dimitrina
Telerik team
 answered on 02 Sep 2010
1 answer
136 views
I'm building a custom control to select color, but when I put a RadColorSelector, the NoTextColor property isn't updated at all.

I've tried either putting directly in the template of my control

<Setter Property="Template">
    <Setter.Value>
        <ControlTemplate TargetType="{x:Type local:RColorChooser}">
            <...>
                <telerik:RadColorSelector x:Name="colorSelector" NoColorText="Desired Text"
                                                      SelectedColor="{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <...>
        </ControlTemplate>
    </Setter.Value>
</Setter>

or using a general property that is bound to the NoColorText which is either changed directly in the default values of my control or set manually in the UserControl in which I'm using the custom Control

<Setter Property="Template">
    <Setter.Value>
        <ControlTemplate TargetType="{x:Type local:RColorChooser}">
            <...>
                <telerik:RadColorSelector x:Name="colorSelector" NoColorText="{TemplateBinding NoColorText}"
                                                      SelectedColor="{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <...>
        </ControlTemplate>
    </Setter.Value>
</Setter>
<Setter Property="NoColorText" Value="Desired Text" />

In both cases the text remains "Automatic" while using changing the property when putting the control outside of a custom control template (as in using the RadColorSelector directly in a UserControl) will change the text correctly.
Tina Stancheva
Telerik team
 answered on 02 Sep 2010
6 answers
394 views
Hi

My RadGridView is bound to some items that implement INotifyPropertyChanged. The grid's ShowColumnFooters property is True and there is a SumFunction in one of the columns. When the grid is initially loaded, the data is displayed fine and the total is correct.
However there is some feature that enables the user to update the values that are displayed in the column that has the total in the footer. This feature updates only one item's value at a time but it's not using editing within the grid but some other editing. When the value is updated, the detail row is changed accordingly but the total in the footer is not.

I have found out that when editing the value directly in the grid it's working as well as when adding or removing rows (i.e. total in the footer is updated).

So how can I programmatically instruct the grid to update its totals/footers if this is not done automatically?

Thanks and regards,

Christian

Maya
Telerik team
 answered on 02 Sep 2010
3 answers
122 views
Hi.

I´m using a gridview to display a number of textboxes. I want to use TAB to jump between the textboxes. If I use tab the cells will be selected but not the textbox. How can i set focus on the textbox when a cell in the grid gets focus?

Best regards
Øystein

Vlad
Telerik team
 answered on 02 Sep 2010
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?