Telerik Forums
UI for WPF Forum
1 answer
111 views
Hi All,

I have a Radgrid element with auto generate columns set to true,
I want to change background color of cells according to the values that are bounded.

How this can be done programatically?
 
I don't specify the coulmns in xaml..? and I can't hook to some appropriate event..
and moreover I can't loop over the rows and the cells.

Please advise,
Mark
Vlad
Telerik team
 answered on 06 Jul 2010
1 answer
75 views
Is it possible to Handle the event for certain items in my Outlook bar, for some of the items I wish to expand the Content and show it in the Pane.

For two of my items, I just want to get the event of it being clicked and selected, but without it expanding in the bar.

I'd like this with Databinding Style if possible.


Cheers, David Poole.
Viktor Tsvetkov
Telerik team
 answered on 06 Jul 2010
1 answer
142 views
Hi,

I'm trying to create a custom control library using telerik controls as base clases, and creating a default styleguide based on the default telerik styles for each control.

Basically, what I have (as if I was extending from standard WPF controls) is a ResourceDictionary (Generic.xaml) with a Targeted Style for each Custom Control, using the 'BasedOn' property. Something like this:

<Style BasedOn="{StaticResource {x:Type ComboBox}}"  
       TargetType="{x:Type local:MyComboBox}">  
        <Setter Property="Background" Value="Red" />  
        <Setter Property="Foreground" Value="DarkGray" />  
</Style> 



Regrettably, it seems this doesn't work out of the box with telerik, I mean, using RadComboBox as StaticResource. I've also tried using the ThemeResourceKey with no luck:

<Style TargetType="{x:Type local:MyComboBox}"  
               BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Office_BlackTheme, ElementType=Controls:RadComboBox}}">  
    <Setter Property="Background" Value="Red" />  
    <Setter Property="Foreground" Value="DarkGray" />  
</Style> 


The MyComboBox file looks like this:
public class MyComboBox : RadComboBox  
{  
        static MyComboBox ()  
        {  
            DefaultStyleKeyProperty.OverrideMetadata(typeof(MyComboBox), new FrameworkPropertyMetadata(typeof(MyComboBox)));  
        }  
}  


I also tried overriding the TargetType of the inherited control, again, no luck:

[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]  
[Ambient]  
public Type TargetType  
{  
    get { return typeof (RadComboBox);}   
}  

Any suggestions?

Thanks,

--
R.

Pana
Telerik team
 answered on 06 Jul 2010
4 answers
288 views
How to add the Rad ContextMenu to Application resource so that it can be used on other windows as well.
Xaria D
Top achievements
Rank 1
 answered on 06 Jul 2010
1 answer
139 views


Hi,

I’m trying to implement a piece of functionality on a floating window that will minimise/re-group the floating window back to the main area of the docking control.

Is there a way to achieve this?
Chris.

Chris Ryder
Top achievements
Rank 1
 answered on 05 Jul 2010
7 answers
138 views
I am using RadDocking along with Prism.  I found the sample provided by Telerik on the subject and i am using it as well.

My problem is that i want to destroy the Region when a RadPane is closed.  Which is something the sample is not doing.

So, it brings us to this:

protected override void Adapt(IRegion region, RadPaneGroup regionTarget) 

At this stage, i would like to be able to get a reference to the RadDocking, to subscribe the Close event, and then do the destroy Region stuff.

But i can't figure out how to get the RadDocking from a RadPaneGroup.  I tried several FindParent function, but none seems to be able to travel up the VisualTree to the RadDocking.

I am using the latest internal build.

Thank you for any help.
Wagner
Top achievements
Rank 1
 answered on 05 Jul 2010
6 answers
308 views
I'm having trouble trying to obtain/apply a default property value from a theme.  Certain actions in my application change the GridViewHeaderCell's foreground property to a color different than that of the theme.  After it changes, I cannot figure out an easy way to change the color back to the theme's normal color.

Here is how I set the style to change the Header cells' color.
foreach(Telerik.Windows.Controls.GridViewColumn column in GridView.Columns) 
   Style s = new Style(typeof(GridViewHeaderCell), column.HeaderCellStyle); 
   s.Setters.Add(new Setter(GridViewHeaderCell.ForegroundProperty, new SolidColorBrush(Colors.Red))); 
   s.Seal(); 
   column.HeaderCellStyle = s; 

To Change it back to the default, I've tried the following
column.ClearValue(GridViewHeaderCell.ForegroundProperty); //no noticeable impact 

column.ClearValue(GridViewColumn.HeadCellStyleProperty);  //no noticeable impact 

 
//this makes the foreground (some text) disappear altogether 
Style s = new Style(typeof(GridViewHeaderCell), column.HeaderCellStyle); 
s.Setters.Add(new Setter(GridViewHeaderCell.ForegroundProperty, null)); 
s.Seal(); 
column.HeaderCellStyle = s; 

None of those three ways seem to do the trick.  I tried clearing the value with the hope that the Theme's default header cell foreground property would take place once the local value is removed, but it doesn't seem to do anything.  

I have also tried getting and storing the default value before I change it (via GridViewHeaderCell.ForegroundProperty.GetMetadata(typeof(GridViewHeaderCell))...) but the PropertyMetaData object returned always indicates that the default Foreground for GridViewHeaderCell is a black brush, even when using themes like Office Black or Vista, which clearly do not use a black brush in their foregrounds. 

Has anyone dealt with this before, or know where I'm going wrong? If anyone can help me figure out the right way to do it, I will be most grateful.

Thanks,
Tom
Tom
Top achievements
Rank 1
 answered on 05 Jul 2010
1 answer
190 views
Hi,
I'm trying to programmatically set a FilterDescriptor to default filter out a number of rows in a dataset/datatable based on 
a Boolean property/column that I retrieve from my database/viewmodel. The problem is that I keep getting conversion error:
'The binary operator Equal is not defined for the types 'System.Object' and 'System.Boolean.'.

 paramView.FilterDescriptors.Add(new FilterDescriptor("Show",FilterOperator.IsEqualTo,true));

I've confirmed that the datatype from the database is a System.Data.DbType.Boolean (shows up in the grid as a checkbox column by default). Am I wrong in assuming that there should be a way of expressing 'true' that meets the requirement of the FilterExpression-generator, or is there another recommended way of accomplishing this task? 


Best regards,

Finn
 
Rossen Hristov
Telerik team
 answered on 05 Jul 2010
1 answer
84 views
Hi,
I'm looking for a way to add animation when a row is removed due to filtering.
I have a grid, with a column containing a checkbox for each row. 
The filter is "false" - when the checking the checkbox, the row will be removed.

I've tried to subscribe to RowUnloaded event, and do the animation, but the row is removed immediately and the animation is not displayed...

Is there an event I could subscribe to before the row is unloaded, or is there another approach to solve this issue?

Thanks,
Liat.
Pavel Pavlov
Telerik team
 answered on 05 Jul 2010
1 answer
114 views

Hi

How can I get single row in the grid and Influence it?

For sample some rows I need to make read only or invisibility

or maybe different style for selected rows?

Best regards

Ehud


Pavel Pavlov
Telerik team
 answered on 05 Jul 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?