Telerik Forums
UI for WPF Forum
3 answers
197 views
Hi there,

I'm developing a view for a model which makes use of DataAnnotation validation. The RadGridView is automatically showing the error messages triggered by invalid input. But, the model's validators are returning a custom implementation derived from System.ComponentModel.DataAnnotations.ValidationResult which contains additional properties. I need to somehow bind those additional properties in the view (e.g. in the GridViewEditorPresenter) but it seems like the RadGridView is transforming the ValidationResult to some Telerik specific class (GridViewCellValidationResult) and of course the additional information gets lost. Is there an easy way (or maybe a work-around) to somehow access the original ValidationResult in the GridViewCellValidationResult-Template?

Regards,
Marcel

Maya
Telerik team
 answered on 09 Dec 2014
5 answers
172 views
I am using the mind map of telerik.

I want to add this functionality in the node. The ability that when a node is double clicked it selects all the text in the node and allows the user to start typing and have it replace the text. This will replace the current functionality of having to double click on a node then clicking the textbox to be able to change the text. 
Martin Ivanov
Telerik team
 answered on 09 Dec 2014
1 answer
280 views
I have a grid with:
CanUserSelect="True"
RowDetailsVIsibilityMode="VisibleWhenSelected"

My RowDetailsTemplate has a StackPanel with the Visibility set using a converter as so:

<telerik:RadGridView.RowDetailsTemplate  >
            <DataTemplate >
                              <StackPanel Orientation="Horizontal" Visibility="{Binding myVariable, Converter={StaticResource IsShownConverter}}" >


The converter is filtering properly, and only about 10% of my rows show something in the details template when selected.
The other 90% of rows when selected open a blank area underneath the row.
That is ok, but not aesthetically pleasing.

How would I use the converter (or some other method?), to only allow the selection and showing of rowdetails for rows where the converter conditions are met?

Thanks.







Yoan
Telerik team
 answered on 09 Dec 2014
4 answers
240 views
Hi,

I am using a RadGridView inside of a UserControl with dynamic content (with MVVM).
The filtering mode of the Grid is set to 'FilterRow'.

Is it possible to remove validation from the TextBoxes of the filterrow?

We would like to use mathematical operators inside the TextBoxes to filter the DataGrid.
Example: If You type '>3' into the column filter of an 'AGE' column ('AGE' is of type 'int') I would like to perform in code behind the 'isGreaterThan' filter method.
The filtering in code behind won't be a problem, but the validation for this column is not accepting '>' because it is not a numeric value.

Can you provide an approach/code samples how to do this?

Thanks in advance
Heiko
ITC
Top achievements
Rank 1
 answered on 09 Dec 2014
1 answer
118 views
I'm having a fair bit of trouble trying to get a binding to work between a Data Access Fluent mapped class using the FetchPlans approach.

I had a previously working RadDataGrid working based on an ObservableCollection, which I manually populated, as you would expect. Now I'm converting the app over to Data Access and I'm stumbling. I have the following code that creates the Fetch Strategy and if I look at the log it does generate the output I would expect from the foreach loops.

Telerik.OpenAccess.FetchOptimization.FetchStrategy fetchStrategy = new Telerik.OpenAccess.FetchOptimization.FetchStrategy();
fetchStrategy.LoadWith<SessionData>(ses => ses.sesAPISource);
fetchStrategy.LoadWith<LapData>(lap => lap.mapSessionIdLap);
fetchStrategy.LoadWith<TelemetryData>(tel => tel.mapLapIdTelemetry);
 
simData.sessionQueryable = from c in simData.fluentModelContext.fluentSessions
        where c.sesAPISource == "MEMAPI"
        select c;
 
//test the iteration through the dataset
foreach (SessionData thesessions in simData.sessionQueryable)
{
    logger.Trace("Session: " + thesessions.sesTime);
    foreach (LapData thelaps in thesessions.sesLapData)
    {
        logger.Trace("Lap: " + thelaps.ltLapNumber);
        int i = 0;
        foreach (TelemetryData thetel in thelaps.ltTelemetryData)
        {
            i++;
            logger.Trace("Tel: " + thetel.telCurrentTime);
            if (i > 20)
                break; //there is a lot of them
            }
        }
}

Previously I had a datasource binding set to {Binding simData.sessionsList} and an itemssource to {Binding}, which worked fine. When I tried accessing the data directly with this: "simData.fluentModelContext.fluentSessions.ToList();" and bound the datasource to {Binding simData.fluentModelContext} and the itemssource to {Binding fluentSessions} that also worked, although the associations didn't, as you may expect.

But I can't seem to get the bindings correct to work with the queryable, which I have declared like this:

private IQueryable<SessionData> sessionqueryable;
public IQueryable<SessionData> sessionQueryable
{
    get { return sessionqueryable; }
    set { if (sessionqueryable == value) return; SetProperty(ref sessionqueryable, value); }
}

I'm fairly sure I've tried all kinds of datasource and itemssource binding combinations, but I just cannot figure out where I've gone wrong. I've tried for about 4 hours or so now and I've just stumped.

Does anyone have any idea of where I've strayed off the path?
Dimitrina
Telerik team
 answered on 09 Dec 2014
3 answers
97 views
On Right Click of the Cluster I would like to get the List of all the Children inside that ClusterItem , SO that I can Display the List in the Context Menu . 


Below is my cluster Code. Could anyone please help me in this




 <telerik:InformationLayer x:Name="InformationLayer" ClusteredDataSource="{StaticResource ClusteredDataSource}"></telerik:InformationLayer>


  <DataTemplate x:Key="ClusterTemplate" x:Name="DataTemplate">
            <Grid x:Name="ParentRoot"     Width="40" Height="40" telerik:MapLayer.Location="{Binding Path=Center}" telerik:MapLayer.HotSpot="0.5,1"
 MouseRightButtonUp="MapMouseRightButtonUp" Tag="{Binding Path=Data}" >
                <Path Data="" Stretch="Fill" Margin="0,0,-0.574,0" StrokeThickness="0.2">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="Green"  Offset="0"/>
                            <GradientStop Color="Green" Offset="1"/>
                            <GradientStop Color="Green"  Offset="0.523"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <!-- Title -->
                <StackPanel x:Name="Text" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <TextBlock  FontSize="13" FontWeight="Bold"
                               Foreground="White"
                               Text="{Binding Path=Count}"/>
                </StackPanel>

            </Grid>
 </DataTemplate>

        <local:MassiveDataSource x:Key="MassiveDataSource" />
        <local:Test x:Key="Test"/>

            <telerik:ClusteredDataSource x:Key="ClusteredDataSource"
                 ItemsSource="{StaticResource MassiveDataSource}" ItemTemplate="{StaticResource ClusteredItemTemplate}"
                ClusterItemTemplate="{StaticResource ClusterTemplate}"   
                GenerateClustersOnZoom="True">

        </telerik:ClusteredDataSource>
vinutha
Top achievements
Rank 1
 answered on 09 Dec 2014
1 answer
143 views
var workbook = CreateWorkBook(grid, settings);
 
                     if (workbook != null)
                     {
                         var provider = new XlsxFormatProvider();
                         using (var output = dialog.OpenFile())
                         {
                             provider.Export(workbook, output);
                             fileName = dialog.FileName;
                         }
                     }

I use your demo for my project. But some time I get Error : the writer is closed or in error state.
Any Idea about this error.
It happen  in line: provider.Export(workbook, output);
Thanks
Petya
Telerik team
 answered on 08 Dec 2014
6 answers
267 views
Hello,

I have an application with lot's of windows with grids to display data. I'm using both RadGridView and RadTreeListView controls.

I need to style grid rows in different ways: mostly it is coloring foreground based on data and alternate rows coloring. Color for alternate rows is the same over the application. But styles for foreground colors are different for every single grid and for different data. So I suppose that if I setup property AlternateRowBackground once in the root style of the grid and then I will specify only RowStyle for every grid based on specific data to display it will merge my specific RowStyle with AlternateRowBackground. Unfortunately, I can't do that because if I set AlternateRowBackground GridView will not merge it with RowStyle: it will only apply AlternateRowBackground for the Background property od GridViewRow and that's all!

I believe it's a bug, because in common cases there're one style for all rows and only background changes for alternates. But now I have to specify AlternateRowStyle basedon my specific row style with only one setter for background for every grid.

For example this thread is about the same problem.
Nick
Telerik team
 answered on 08 Dec 2014
4 answers
93 views
Currently we are working with scheduleview from the UI for WPF Q1 2014 release.

As long as we are working with a mouse everything is working as expected.

the problem we are facing is once we install the application on a touch enabled tablet, we would expect to be able to pan through the calendar (vertical) as we would on a list control or any other control really.

but the only way for scrolling seems to be to actually use the vertical scrollbar on the right of the screen.

is there any way to enable scrolling/panning on a touch device?

regards.
Johan Lollinga
Johan
Top achievements
Rank 1
 answered on 08 Dec 2014
1 answer
173 views
Hi, 

I'm using RadCartesianChart for displaying ScatterAreaSeries. Below you can find my TrackBallInfoTemplate for the series. The problem with the TrackBallInfoTemplate is, if there is more than Point on the same Xvalue with different Yvalues, it displays the values from the first Point. But I want to display values from both Points or I want to be able to choose which point to display on theTrackBallInfoTemplate.

Please advice,

Regards
Semih 

<telerik:ScatterAreaSeries.TrackBallInfoTemplate>
                                <DataTemplate>
                                    <Grid Margin="0,0,0,0">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                                            <ColumnDefinition Width="100*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition></RowDefinition>
                                            <RowDefinition></RowDefinition>
                                            <RowDefinition></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource statisticsTextStyle}" TextAlignment="Justify" Grid.ColumnSpan="2" Text="{Binding DataPoint.DataItem.Description}" />
                                        <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource statisticsTextStyle}" Text="Break:"  FontWeight="Bold"/>
                                        <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource statisticsTextStyle}" Text="{Binding DataPoint.DataItem.Xvalue, StringFormat=\{0\}. second}" Margin="3,0,0,0"/>
                                        <TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource statisticsTextStyle}" Text="Saving:" FontWeight="Bold"/>
                                        <TextBlock Grid.Row="2" Grid.Column="1" Style="{StaticResource statisticsTextStyle}" Text="{Binding DataPoint.DataItem.Yvalue, StringFormat=\{0:0.00\}}" Margin="3,0,0,0" />
                                    </Grid>
                                </DataTemplate>
                            </telerik:ScatterAreaSeries.TrackBallInfoTemplate>
Peshito
Telerik team
 answered on 08 Dec 2014
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?