Telerik Forums
UI for WPF Forum
2 answers
317 views
I have a RadDataForm, with a DataFormDataField, that is bound to a Decimal property.

I'm trying to get validation working, and I'm having some issues:

  1. When I have a validation error, and the DataFormDataField does not have its Label property set, the error is displayed using the name of the field, instead of the [Display(Name="xxx")] annotation.
  2. When I enter invalid characters (non-numeric), my Decimal property's setter is never called, instead the form displays a "Value 'xxx' could not be converted" error. I need to display a more meaningful message.
  3. I have a listener on the RadDataForm's ValidatingItem event - but that event is not called when I move focus from one field to another (which is when the above error messages appear.)
  4. I need to some level of validation on each keystroke. If the field can only hold 12 characters, an attempt to type a 13th should do nothing. If the user is typing in a field that can only hold numeric values, typing non-numeric characters should do nothing - the keyboard event should be swallowed, and the character should not appear in the field.  At a minimum, letters would be filtered, it'd be better if we could look at the new character and the existing content, and decide whether the new character can be applied without invalidating the field.  (If the field is bound to a decimal, it should allow numbers, and one decimal point. A second decimal point should be swallowed.)
Jeff
Top achievements
Rank 1
 answered on 16 Apr 2012
0 answers
129 views
Hi,
I would like to change the +/- symbol on a GridViewToggleRowDetailsColumn so i have created below ControlTemplate
<ControlTemplate x:Key="GridViewToggleButtonTemplate" TargetType="telerik:GridViewToggleButton">
                   <Border Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                       <Border Width="80" Height="20"
                   Background="{TemplateBinding Background}"
                   BorderBrush="{TemplateBinding BorderBrush}"               
                   BorderThickness="{TemplateBinding BorderThickness}"
                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                           <Grid x:Name="myGrid">
                               <TextBlock Text="Details" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                           </Grid>
                       </Border>
                   </Border>
                   <ControlTemplate.Triggers>
                       <Trigger Property="IsChecked" Value="True">
                           <Setter TargetName="myGrid" Property="Background" Value="Red" />
                       </Trigger>
                   </ControlTemplate.Triggers>
  
               </ControlTemplate>
  
               <Style TargetType="telerik:GridViewToggleButton" x:Key="toggleButtonStyle">
                   <Setter Property="Template" Value="{StaticResource GridViewToggleButtonTemplate}" />
               </Style>

And applied this style in telerik:RadGridView.Columns as below
<telerik:GridViewToggleRowDetailsColumn ToggleButtonStyle="{StaticResource toggleButtonStyle}" />

But this doesn't work so please let know how do i fix this problem.
Thanks in advance.
Pravin
Top achievements
Rank 1
 asked on 16 Apr 2012
1 answer
212 views
I am using the RadGridView
And I am having few doubts (WPF thing )
1) I am making the Autogenerated columns as True then the data gets populated auomatically. But what is the thing if I have the Property in the binding collection of type BOOLEAN and I want that to be shown as CheckBox, Can this be achieved with Autogenerated columns as True.

2) I am using the printing functionality for the gridview, incase I have a dropdown in the column and how do i get the selected dropdown item from that column and print it.

3) Also how do I print images from a grid view

4) And Finally I want to do some error handling for the data in the RadGridView, I dont find any where in ur site like demo kind for the error handling thing.
Dimitrina
Telerik team
 answered on 16 Apr 2012
1 answer
64 views
I can set color to the chart axis lines for a 2D chart by setting the AxisElementBrush of the chart control just like this:

mChartControl.AxisElementBrush = new SolidColorBrush(value);

This does not work with 3D charts. How can I get the grid lines to change colors when the chart is 3D? Why is it that I am running into so many problems to get a 3D chart to act the same as a 2D chart? dll version 2011.2.920.40 Thanks, James
Sia
Telerik team
 answered on 16 Apr 2012
0 answers
124 views
Hi. I have a small problem with RadDocking that I'm hoping there is some functionality to solve. We are using the Save/Load Layout methodology for capturing the state of our RadPanes and other controls. This provides a chunk of XML that we save out and load in as required. Unlike the PersistenceManager methodology though, there seems to be no way to prevent certain properties from being added to the XML chunk that's generated when SaveLayout is called on a RadDocking control. When developers change the header of a RadPane, for instance, the change is overwritten when the XML is passed to LoadLayout (even when the RadPane's SerializationTag is changed, which is very strange). I'm wondering if there's some way of preventing the Header property from appearing in the XML, or if we need to take steps to remove it ourselves. It's either this or ignore all of the XML, and leave the controls to assume their default configuration, overwriting the XML.

Many thanks,
- Chris M.
ChrisM
Top achievements
Rank 1
 asked on 16 Apr 2012
5 answers
105 views
Hi,

We are using RadGridView, RadPanelBar, RadDataFilter, RadBusyIndicator in our application.  We need to be 508 compliant and we were under the impression that Telerik controls were compatible.  When I use Jaws e-reader, navigation panel is not read by the e-reader.  DataFilter's dropdowns are not read, either.  If a user selects a column or filteroperator, they have no idea what they chose.
GridView's headers are skipped when tabbing through and goes into the data rows.  Add new item bar is also skipped.

Is there a property or maybe a setting we need to apply to get RadControls reader ready?

Thanks,
Dimitrina
Telerik team
 answered on 16 Apr 2012
0 answers
102 views
Hi,

i'm using the radCombobox like this:

<telerik:RadComboBox Grid.Row="0" Grid.Column="1" Margin="3" telerik:StyleManager.Theme="Summer" Name="SpracheCCB" DisplayMemberPath="Name" SelectionChanged="SpracheCCB_SelectionChanged"  />

I want set the selectedItem in the codebehind like this:

this.SpracheCCB.SelectedItem = SETTINGS.aktsprache;  
or
this.SpracheCCB.SelectedItem = 1;

SETTINGS.aktsprache = "german"

But it empty every time?!?!?
Is there a "simple" Example?

thanks
regards
rene
ITA
Top achievements
Rank 1
 asked on 16 Apr 2012
1 answer
83 views

I would like to bring a row of my RadGridView into view programatically. I have a more than 100 rows. When I create a row(which I am doing by adding an item to a observable collection) I would like that new row to be selected and bring that into view. I was able to select the new row in my code but could not do the scrolling. More over I want the first cell of the row to be in edit mode so that the user can input text. I am following MVVM pattern for the application and would like to keep zero code in my views. How Can I achieve this?

Any help or suggestion will be appreciated....

Here is some of my code

XAML

<telerik:RadGridView ItemsSource="{Binding AllPartClasses}" 
                     
SelectedItem="{Binding SelectedPartClassViewModel, Mode=TwoWay}"        
                     
SelectionMode="Single" IsSynchronizedWithCurrentItem="True">

in my view model I did this

void AddNewPartClassExecute()
    {
        PartClass newPartClass = new PartClass();
        PartClassViewModel tempPartClass = new PartClassViewModel(newPartClass);
        tempPartClass.IsInValid = true;
        AllPartClasses.Add(tempPartClass);
        SelectedPartClassViewModel = tempPartClass;
        Global.DbContext.PartClasses.AddObject(newPartClass);

        //OnPropertyChanged("AllPartClasses");
    }
public PartClassViewModel SelectedPartClassViewModel
    {
        get
        {  
            return _selectedPartClassViewModel;
        }
        set
        {
            _selectedPartClassViewModel = value;
            OnPropertyChanged("SelectedPartClassViewModel");
        }
    }

Dimitrina
Telerik team
 answered on 16 Apr 2012
2 answers
107 views
I am using RadTreeListView, provided the Xaml below.
I wanted to do validation for the text box column, similar to what is provided for GridView column, 'CellValidating' event where if validation logic fails, text box shows a comment, and the border will become red. Is this supported in RadTreeListView, how can I implement in my code?

 <telerik:RadTreeListView x:Name="MyTree" AutoGenerateColumns="False">
 <telerik:RadTreeListView.Columns>
                    <telerik:GridViewDataColumn x:Name="ObjNameColumn" Header="Name" DataMemberBinding="{Binding Name}" >
                        <telerik:GridViewDataColumn.CellStyle>
                            <Style TargetType="telerik:GridViewCell">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate>
                                            <Border BorderBrush="LightGray" BorderThickness="0,0,1,0">
                                                <TextBox x:Name="txtBox_NewInstanceName"                                                   
                                                           HorizontalAlignment="Center" VerticalAlignment="Center"    
                                                            Text="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus}">
                                                </TextBox>
                                            </Border>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:GridViewDataColumn.CellStyle>
                    </telerik:GridViewDataColumn>
...
...


Smita
Top achievements
Rank 1
 answered on 16 Apr 2012
4 answers
131 views
I had a RadGridView that I allo add new and edit on the grid.  All my grids work perfect but one.  When ever I either click an existing row, or add a new row then move to another the grid no longer allows me to enter edit mode.  It saves ther changes successfully but then the gird is locked, I have to close the screen and reload it to make anotther edit.  I have 6 other screens and this work perfect, I can edit a row, add a row, and keep on going to the new row and edit it.
Dimitrina
Telerik team
 answered on 16 Apr 2012
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
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
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
Bronze
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
Bronze
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?