Telerik Forums
UI for WPF Forum
7 answers
137 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
302 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
185 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
82 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
111 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
1 answer
53 views
ChartArea.ItemWidthPercent is a DependencyProperty within a RadChart, but setting it after a chart is drawn has no visible effect, only if it is set to the desired value before the RadChart is drawn. I've tried setting it in bindings, as well as setting it manually with code-behind driven by WPF events to no avail. Is this intended behavior? Am I missing something that must be done (will post code if needed)? Or is it simply that once the chart has been rendered, it must be re-rendered to take into effect some changes?
Nikolay
Telerik team
 answered on 05 Jul 2010
1 answer
71 views
Hi,

I have a radchart with a Canvas overlay.  In the canvas I allow my users to create a rectangle to enclose the bars/data points that he may be interested.  The Canvas is 1:1 size with the radChart.  

Now based on the rectangle coordinates... How do I find which bars the user selected on the bars underneath my layer?  Is there a way I can pass screen/canvas coordinates to the radchart and get back a collection with the items inside the range?

Something like:

selectedCollection =  radChart.getItems(Point p1, Point p2);

J
Ves
Telerik team
 answered on 05 Jul 2010
2 answers
1.2K+ views
Hi, hopefully this will be a simple question with a quick answer.

My logical data structure is a List (eg. List<TopList>) with each item in the first list also having it's own list (eg. TopList[0].MiddleList). Finally, each MiddleList has some other class (eg. TopList[0].MiddleList[0].BottomClass), and I want to display all three in the UI with a RadTreeView for expanding and drag and drop support.

My xaml is set up as:
        <HierarchicalDataTemplate x:Key="GroupListNestedContentTemplate"
            <bui:UserControlForBottomClass/> 
        </HierarchicalDataTemplate> 
         
        <HierarchicalDataTemplate x:Key="GroupListNestedTemplate" ItemsSource="{Binding BottomClass}" ItemTemplate="{StaticResource GroupListNestedContentTemplate}"
            <bui:UserControlForMiddleLevel /> 
        </HierarchicalDataTemplate> 
         
        <HierarchicalDataTemplate x:Key="GroupListTemplate" ItemsSource="{Binding MiddleList}" ItemTemplate="{StaticResource GroupListNestedTemplate}"
            <bui:UserControlForTopLevel/> 
        </HierarchicalDataTemplate> 
 
<Controls:RadTreeView x:Name="UiElement" DataContext="{Binding}" ItemsSource="{Binding}" ItemTemplate="{StaticResource GroupListTemplate}" IsDragDropEnabled="True" IsSingleExpandPath="True" IsExpandOnSingleClickEnabled="True" /> 

With codebehind setting UiElement.DataContext = TopList.

The problem is that (from all the examples I've seen) the RadTree requires my BottomClass to be in a List. Changing my BottomClass into a List will render and databind correctly. Ideally though, I don't want to do this to my logic and create a List with only one item. My question is basically: Is there a way to DataBind and display my BottomClass without putting it into a List and without using a for loop in the code behind?

As a side note I've considered turning my UI structure into a RadTree with Expanders as the contents, but this ran into display and usability issues when collapsing the expander vs closing the tree nodes.
William
Top achievements
Rank 1
 answered on 05 Jul 2010
1 answer
89 views

Hi

Is there property for the rows number (IsRowsNumbersEnable) or I need to build it myself like in the Sample?

Best regards

Ehud

Ваня
Top achievements
Rank 1
 answered on 04 Jul 2010
0 answers
91 views
Hello,

I have a RadCalendar and I'm binding the SelectedDate property. It's working fine - the source and the target get updated as normal. However, I want to bring the selected date into view when it doesn't belong to the month being displayed.

Edit: I solved my problem using DisplayDate.
Yavor
Top achievements
Rank 1
 asked on 02 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
Slider
Expander
TileList
PersistenceFramework
DataPager
TimeBar
Styling
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
CardView
DataBar
WebCam
FilePathPicker
Licensing
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? 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?