Telerik Forums
UI for WPF Forum
1 answer
396 views
I really like the ControlPanel feature of RadGridView and I am already using the two ControlPanelItems that you provide in your demo section (column chooser and settings) and they work nice. Unfortunately you just provide a ControlPanelItem with a RadDropDownButton in its ControlTemplate but what I want is just a RadButton. To achieve this I've copied the ControlPanelItem classes from your RadGridView SourceCode and created a CustomControlPanelItem. I've also copied the template and style of ControlPanelItem and replaced the RadDropDownButton with RadButton (please see attached screenshot). But now I'm stuck at adding a command to that RadButton. The purpose of the button is to refresh the data in the RadGridView. Can you provide some help how to achieve this goal?
Yoan
Telerik team
 answered on 05 Aug 2014
3 answers
369 views
Hi guys,

The problem is that in the property box we have, when the user types a string in a field that’s bound to a float property the by default  error is displayed. The customer wants  to display some nice user friendly errors.
 
I have a property grid (called AssociatedObject), and for this property grid I add the PropertyDefinitions from code (using a Behavior)  like this:

The AssociatedObject is of type RadPropertyGrid

foreach (CustomerCustomFieldVMv customField in propertyItemsForCompanyList)

            {

                Binding bind = new Binding();

                switch (customField.ValueType)

                {

                    case CustomFieldValueType.Float:

                       
                 //custom field is of type float

                       
              bind = new Binding

                          
           {

                               Source =customField,

                               Path = new PropertyPath("FloatValue"),

                               Mode = BindingMode.TwoWay,

                              
                              UpdateSourceTrigger = UpdateSourceTrigger.LostFocus,

                              
                              ValidatesOnDataErrors = true,

                              
                              NotifyOnValidationError = true

                          
};

                        bind.ValidationRules.Add(new NumericFieldValidation());

                       
                    break;

                    case CustomFieldValueType.String:

                       
                                     //custom field is of type string

                       
                                    bind = new Binding

                           {

                               Source =customField,

                               Path = new PropertyPath("StringValue"),

                               Mode = BindingMode.TwoWay

                          
                    };

                       
                     break;

                    default:

                       
                    break;

                }

                var newDefinition = new PropertyDefinition()

                         
{

                              Binding = bind,

                              DisplayName =
customField.Description,

                              IsReadOnly = false

                         
};

 

               
AssociatedObject.PropertyDefinitions.Add(newDefinition);

            }

The FloatValue property is of type float and the StringValue is of type string. The values are bind and displayed correctly.

 

The class where I want to do the validation is NumericFieldValidation. It’s looking like this:

public class NumericFieldValidation : ValidationRule

    {

        private string invalidInput = “error wrong format”;

 

        // Implementing the abstract method in the Validation Rule class

        public override ValidationResultValidate(object value,System.Globalization.CultureInfo cultureInfo)

        {

            float val;

            if(!string.IsNullOrEmpty((string)value))

            {

                // Validates weather Non numeric values are entered as float value

                if(!float.TryParse(value.ToString(),out val))

                {

                    return new ValidationResult(false,invalidInput);

                }

            }

 

            return new ValidationResult(true,null);

        }

    }

In order to display the errors visual studio throws I use tooltip messages.

<telerik:RadPropertyGrid.Resources>

                <Style TargetType="{x:Type TextBox}">

                    <Style.Triggers>

                       
<Trigger Property="Validation.HasError" Value="True">

                           
<Trigger.Setters>

                                <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self},Path=(Validation.Errors).CurrentItem}"/>

                                <Setter Property="BorderBrush" Value="Red"/>

                                <Setter Property="Background" Value="#FFCCCC"/>

                           
</Trigger.Setters>

                        </Trigger>

</Style>

</telerik:RadPropertyGrid.Resources>

 

The problem I have is that when I type something in the FloatValue field inside the property grid I would like it  to go to the Validate method from NumericFieldValidation, but it’s not. It ignores the Validation rule I added for the FloatValue property.

Can you please help me with a solution? It would be very helpful if the binding would send the user to NumericFieldValidation class for validation.

Best regards,
Adriana
 
Dimitrina
Telerik team
 answered on 05 Aug 2014
1 answer
165 views
Hi,

Is there a way to get how many rows are visible and the index of first row showing in the SrollViewer? I have tried to get ScrollViewer to get ViewPortHeight and VerticalOffset, but they are in pixels instead of the the number of items even if I set CanContentScroll=true?

Thanks in advance.

Cho
Dimitrina
Telerik team
 answered on 05 Aug 2014
14 answers
368 views
Hi,

When I create a new Appointment as AllDayEvent it does not look any different from a normal event, is there any way to make it outstanding? So when someone looks at the ScheduleView he/she can instantly see that this is all day event? For example in Outlook these events are move to the top (see the attachment), so I can see them at any time when I look at the particular date. Otherwise I would have no clue that this is all day event untill I actually open it.

Is there any way to achieve this?

 

Kind Regards

Rob
Top achievements
Rank 1
 answered on 05 Aug 2014
1 answer
389 views
Hi,
The below code is used to give the user the option for adding formatted text. Like in excel, when the user is adding contents to right footer, the cursor starts from the right. Similarly, i want the cursor to start from the right for the below text box.

For the center footer text box, the contents should get aligned center. Please help me in this regard.

 <telerik:RadRichTextBox Grid.Row="1" Grid.Column="0"  HorizontalAlignment="Left" Name="TxtRightFooterBox" IsSpellCheckingEnabled="False" IsContextMenuEnabled="False" IsSelectionMiniToolBarEnabled="False"
                                    DocumentInheritsDefaultStyleSettings="True"  GotFocus="TxtRightFooterBox_OnGotFocus" Visibility="Visible" Width="175" Height="125" Margin="5">
                <telerik:RadRichTextBox.Document>
                    <telerik:RadDocument>
                        <telerik:Section>
                            <telerik:Paragraph FontSize="10">
                                <telerik:Span FontFamily="Arial" Text=" "  FontSize="10" />
                            </telerik:Paragraph>
                        </telerik:Section>
                    </telerik:RadDocument>
                </telerik:RadRichTextBox.Document>
            </telerik:RadRichTextBox>

Thanks,
Petya
Telerik team
 answered on 05 Aug 2014
1 answer
152 views
The Q1 2013 release notes specifies that a way to "make the row expand automatically in MonthViewDefinition when there are more appointments" was added, but I can't seem to find how to accomplish this.
Yana
Telerik team
 answered on 05 Aug 2014
2 answers
148 views
I have some appointments with short durations (1 minute). In Vertical orientation (e.g. the default DayView) this only shows as a line.

I found out about the option "EnableSmallAppointmentRendering", but when I set this the appointment takes too much space.
Is it possible to set this?

The attached file presents such an example. The item only takes 2 minutes, but the item is displayed covering a big block. Ideally this should be set. Can it be done?

Jim

Jim
Top achievements
Rank 1
 answered on 05 Aug 2014
3 answers
195 views
I add and remove RadPanes from my DocumentHost in code.  When I add or remove a panel I want to animate it i.e. slide the panel in or out from the right.  Is there a code example posted that will tell me how to do that using Animation Manager?


Thanks,

Sam
Masha
Telerik team
 answered on 05 Aug 2014
5 answers
232 views
We are using the RadPDFViewer from the Q3 2013 sp 2 release and it cannot seem to load PDF's that were scanned.  Looking around the web I've found that it might be an issue with the decoder but found that the scanned pdf's I've been working with use DCTDecode which Telerik list as fully supported (http://www.telerik.com/help/wpf/radpdfviewer-customize-pdf-rendering.html)

Would I have to create a custom filter for the pdf viewer or is there another reason behind this issue?

Thanks,
Kyle
Kyle
Top achievements
Rank 1
 answered on 04 Aug 2014
1 answer
104 views
hi,
I’m using gridview in rowFilter mode. When I select  ClearFilter item, the text in textbox does not clear.
how to enforce clear textbox text in gridview filtered event?
Dimitrina
Telerik team
 answered on 04 Aug 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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?