Telerik Forums
UI for WPF Forum
0 answers
151 views
Greetings,

How does one fetch the distinct values in a RadGridDataColumn as formatted via the binding's IValueConverter or StringFormat?  The rdGrid.GetDistinctValues(column, true, null) method returns the raw unformatted values.

Is there a clever or easy way to get the formatted values as displayed in the grid?

Thanks

I figured it out.  Here's how it can be done:

var distinctValues = uxGrid.GetDistinctValues(column, truenull);
var clip = string.Empty;
int count = 0;
Func<objectobject> formatter;
if (column.DataMemberBinding.Converter != null) {
    formatter = _ => column.DataMemberBinding.Converter.Convert(_, column.DataType, nullCultureInfo.CurrentUICulture);
} else if (!string.IsNullOrEmpty(column.DataMemberBinding.StringFormat)) {
    formatter = _ => string.Format(_.ToString(), column.DataFormatString);
} else {
    formatter = _ => _;
}
foreach (var value in distinctValues) {
    clip += formatter(value) + "\n";
    count++;
}
clip = clip.TrimEnd('\n');
Clipboard.SetText(clip);
Calvin
Top achievements
Rank 2
 asked on 15 Jul 2011
6 answers
181 views
Is there a way to bind my gridview columns to different collections? I looking for independant column binding.

Something like :

GridView1.Columns(0).ItemsSource = colA
GridView1.Columns(1).ItemsSource = colB

Thanks



Greg
Top achievements
Rank 2
 answered on 15 Jul 2011
4 answers
136 views
Hi, I am using RadMenu to create a three layer menu.
It is something like :    -TopMenu
                                        -SecondLevel1  -ThirdLevel
                                        -SecondLevel2  

Now, If I click "ThirdLevel" or "SecondLevel2", the menu will be closed automatically. But If I click "SecondLevel1", nothing happens. I know it is the logic you made it. But I want to close the menu when clicking "SecondLevel1". If there any way to do it?
Dani
Telerik team
 answered on 15 Jul 2011
1 answer
123 views
I have an implicit style:

<telerik:RadGridView.Resources>
    <Style TargetType="{x:Type telerik:GridViewCell}">
        <Setter Property="Foreground" Value="Red" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsAllowedToEdit}" Value="True"/>
                    <Condition Binding="{Binding Path=Column.IsReadOnly, RelativeSource={RelativeSource Self}}" Value="False"/>
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.Setters>
                    <Setter Property="Background" Value="#DBFFEC"/>
                </MultiDataTrigger.Setters>
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
</telerik:RadGridView.Resources>

But i have to scroll up and down, and one after another each row cells turns green if it is supposed to.

How can i fix this?
Vanya Pavlova
Telerik team
 answered on 15 Jul 2011
4 answers
580 views
I'm considering moving to Telerik grids.  One of the issues I've come up against is that it doesn't look like I can perform bindings which relate to the bound objects ToString() method.

With WPF Toolkit DataGrids I could have a binding on a list view which looked like:

Binding="{Binding}"

This would mean that the ToString() method on the relivant object in the bound collection would be called and displayed.

On Telerik controls if I perform a binding such as:

DataMemberBinding="{Binding}":

Then I do not see this behaviour.  Is this feature missing from your controls or do I have to approach this in another way?  This is something I would really like to be able to do as it allows me to display composite data in a single field.

Thanks
Tony
Top achievements
Rank 1
 answered on 15 Jul 2011
5 answers
143 views
I'd like to expand all TreeListView nodes when the data is loaded. I tried to use DataLoaded event for it but got a problem. After calling ExpandAllHierarchyItems() in DataLoaded event handler, this event fires again and app goes into infinite loop. How can I handle with it? Note: I need expanded tree after each data update, not only once.
Max
Top achievements
Rank 1
 answered on 15 Jul 2011
4 answers
100 views
I have a TreeListView and simple data binding with PropertyChanged notification. Selecting a ComboBox value causes updating of node's child elements in the tree but sometimes cells don't get updated. PropertyChanged() invoked, actual value changed but no reaction from grid. New values appear only after scrolling or shrinking\expanding tree node. I suppose this strange behaviour is due to cells virtualization but don't know how to fix it.
Max
Top achievements
Rank 1
 answered on 15 Jul 2011
1 answer
338 views
Congrats on the forward thinking with respect to the Metro theme.

The docs are a little behind the code (we all sympathise), so I was wondering how to set the Metro theme, and select the Colors used in the theme. Purple is a bit....purple. :)

Bob
Dani
Telerik team
 answered on 15 Jul 2011
2 answers
345 views
I just downloaded the new Q2 bits (demo is impressively clean - nicely done!) and realized you're now offering a busy indicator similar to the one in Windows Phone - something I've been looking for for awhile now. The only question I have is if there is a way to change the color of the ellipses used in the control? I was looking through the them (BusyIndicator_style.xaml) and I can see where the fill is set to AccentBrush but I wasn't sure if it was possible to override this with another color. Purple doesn't really match my app very well.

Thanks in advance!

Edit: One thing that is missing from the demo is a way to change the theme on all the controls. What happened to that choice? I like the Metro one, but I would like to see some of the others too - especially for the main progress bar.
Dani
Telerik team
 answered on 15 Jul 2011
3 answers
92 views
Hello,

I want the RadScheduleViewer to scroll in TimelineView from currentdate to the next or previous appointment.

Do i have to implement a custom solution?

For what is the property AppointmentNavigationButtonsVisibility used?

It seem not to work. When the AppointmentNavigationButtonsVisibility is set to Allways nothing happens.

Please help !!!

Greetings
Valeri Hristov
Telerik team
 answered on 15 Jul 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
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
Security
VirtualKeyboard
HighlightTextBlock
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?