Telerik Forums
UI for WPF Forum
7 answers
1.0K+ views
I am upgrading from Q3 2011 to Q2 2012 and ran into a problem with the numeric input.  I cannot enter a negative value into my textboxes.  It doesn't throw an error - it just ignores the negative sign.  I have tried the number pad and the regular keyboard and I have tried entering the negative first and entering it last.  Nothing seems to work.
See below for an example of one of the text boxes.  I checked the value in the validator and it is positive there so it isn't the validator changing the value.

<telerik:GridViewDataColumn DataMemberBinding="{Binding Units}" DataFormatString="{}{0:f2}" IsFilterable="False" Width="80"
                                            IsReadOnlyBinding="{Binding HideUnits}">
                    <telerik:GridViewDataColumn.Header>
                        <TextBlock Text="Units" TextWrapping="Wrap" />
                    </telerik:GridViewDataColumn.Header>
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>                                                      
                            <telerikInput:RadMaskedNumericInput x:Name="txtUnits" Mask="#9.2"
                                                                SpinMode="None" IsClearButtonVisible="False" SelectionOnFocus="SelectAll"
                                                                KeyboardNavigation.TabNavigation="Local" TextMode="PlainText"                                                               
                                                                Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}" 
                                                                 >
                                <telerikInput:RadMaskedNumericInput.Value>
                                    <Binding Path="Units" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
                                        <Binding.ValidationRules>
                                            <imKASHelper:DoubleValidationRule Min="-100000000.00" Max="100000000.00" />
                                        </Binding.ValidationRules>
                                    </Binding>
                                </telerikInput:RadMaskedNumericInput.Value>
                            </telerikInput:RadMaskedNumericInput>
 
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

Koren
Top achievements
Rank 1
 answered on 18 Jul 2012
2 answers
137 views
My boss just showed this to me, though it's been in the application for a while.  If a user double clicks on the divider between columns in the column header on this one RadGridView control in my app, the following exception is thrown:

2012-07-18 09:11:18,106 [1] FATAL CarSystem.App [(null)] -  Invalid value!
Parameter name: value
  
   at Telerik.Windows.Controls.GridViewLength..ctor(Double value, GridViewLengthUnitType type, Double desiredValue, Double displayValue)
   at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnColumnHeaderGripperDragCompleted(Object sender, DragCompletedEventArgs e)
   at System.Windows.Controls.Primitives.DragCompletedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Here is the XAML for the RadGridView in question:

<telerik:RadGridView AutoExpandGroups="True"
                     AutoGenerateColumns="False"
                     CanUserDeleteRows="False"
                     CanUserFreezeColumns="False"
                     CanUserInsertRows="False"
                     CanUserResizeColumns="True"
                     CanUserSortColumns="True"
                     EnableColumnVirtualization="True"
                     EnableRowVirtualization="True"
                     FontSize="16"
                     FontWeight="Bold"
                     IsReadOnly="True"
                     MouseDoubleClick="HotListEntriesGrid_MouseDoubleClick"
                     Name="HotListEntriesGrid"
                     SelectionChanged="HotListEntriesGrid_SelectionChanged"
                     SelectionUnit="FullRow"
                     ScrollViewer.CanContentScroll="True"
                     ScrollViewer.HorizontalScrollBarVisibility="Auto"
                     ScrollViewer.VerticalScrollBarVisibility="Auto"
                     ToolTip="Matching Hot List Entries">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Plate,        Mode=OneWay}"
                                    Header="Plate"
                                    Width="1.5*" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding LocaleCode, Mode=OneWay}"
                                    Header="State"
                                    Width="75" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ListName,   Mode=OneWay}"
                                    Header="Hot List"
                                    Width="150" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding AlarmClass, Mode=OneWay}"
                                    Header="Alarm Class"
                                    Width="175" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Notes,     Mode=OneWay}"
                                    Header="Notes"
                                    Width="1*" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

With some experimenting, I've found that the exception is thrown only if you click on those columns that contain "*" in their Widths.  if you set it to Auto or a fixed value, it doesn't happen.

Tony
Tony
Top achievements
Rank 1
 answered on 18 Jul 2012
1 answer
235 views
Hi,

I have a code similar to this:

        RadWindow.Confirm("Are you sure?", AddressOf OnClosed)
MessageBox ("Hi World")        

The alert or message always show it....regardless of response, in fact is an immediate action.

Is there a way that predefined windows you can wait for confirmation or selection by the user?

Something like Windows Desktop. NET:

If (message) = vbYes Then
MessageBox ("Hi World")     
End If

In advance, thank you all.
Vladi
Telerik team
 answered on 18 Jul 2012
6 answers
195 views
Hi,

When the QuickAccessToolbar of the RadRibbonView has many items added to it, not all items are visible or accessible.  Is there a way to cause the QuickAccessToolbar to grow in size (i.e. double in size)?  Or is there a way to automatically add items that are not visible to overflow?

Thanks,
Trang
Tina Stancheva
Telerik team
 answered on 18 Jul 2012
1 answer
265 views
Hi,  Is there a way to set the DataFormDataField so that the TextBox has a MaxWidth, and the Label width stretches to cover the rest of the width of the DataField?

I'm trying to create a form where the responses will all be numeric (so the TextBox doesn't need to stretch to Infinity), but the length of the label varies wildly (ergo, does need to stretch).  The labels on my DataFormDataFields are being cut off to allow the TextBox (plus spacing) to have more room.  If I increase the width of the DataField, this increases the amount of space between the TextBox and the Label. 

I've played with the Width of the DataField, the Min, Max & Width of the DataField.Label, the Width of TextBoxes, all to no joy.  Similar results messing with HorizontalAlignment, HorizontalContentAlignment, and even ZIndex (I thought I could bring the label above the text box).

Thanks for any ideas, I'm at the stage where I'm about to start coding a Label + TextBox in a Stackpanel solution for each of my datafields, and I'd _really_ prefer not to.  

Also (coz I think it's relevant but I'm not sure), I don't have Expression Blend.

cheers

Alex



Dimitrina
Telerik team
 answered on 18 Jul 2012
1 answer
98 views
How to get the main RadPaneGroup (host)?
The following example is not possible to obtain the public RadPaneGroup (host). 

RadPane rp = new RadPane();
//rp.content = ......;
//......;
RadSplitContainer splitContainer = radDocking.DocumentHost as RadSplitContainer;
RadPaneGroup paneGroup = (splitContainer.Items as IEnumerable<RadPaneGroup>).FirstOrDefault(s => s.IsInDocumentHost == true);//(get error)
paneGroup.Items.Add(rp);


Vladi
Telerik team
 answered on 18 Jul 2012
8 answers
218 views
Hi,

in my application I use a RadCarousel. When I click on my document RadButton, I open a PDF document with 2 pages, I extract each page as an image, after each image extraction, I the add the new created image into my RadCarousel and I call the following method:
 

pCarousel.BringDataItemIntoView(pCarousel.Items[0]);

to have the first page ont top. The 2nd page in my carousel sill white (empty) until I scroll the 2nd page ouside the carousel view and bring it back into th carousel view, at this time I can see the 2nd page content.

Thank's

 

Nick
Telerik team
 answered on 18 Jul 2012
7 answers
176 views
Hello,

First off all, I'd like to state the excellent work you guys did on the WPF controls. I'm using the ScheduleView quite heavily and the SP release fitted most of my needs. And I was able to add some features:

- resource availabilities (by the specialslots)
- alternative resource selection in the group headers (combobox style)
- fixed scroll when updating the resources/resourcetypecollection
- centered zooming (the zooming example zooms at the daystarttime, which is not really what it should be)
- current time - line on the dayview
- custom dragdop behavior for readonly appointments
- overriding the CalculatedScrollBarVisibilities

Currently I'm stuck on the following issue. I'd like to use the vertical dayview where I can drag existing appointments up down.
What I'm trying to achieve is that when the dragged appointment (visual cue) is near the top the calendar starts scrolling (until the start day time is met), of course I'd like to do the same thing when dragging and resizing down ! Any clue how to do this?

Thanks,
Nico


Vladi
Telerik team
 answered on 18 Jul 2012
5 answers
1.0K+ views
Hi,
q1 : I want to remove the grey background from the pdfviewer (for making a style)?

Is there a way to do this?

thanks
Kammen
Telerik team
 answered on 18 Jul 2012
1 answer
387 views
Hi,

I am looking for displaying 3D PDF in my  WPF application.  Does Telerik PDF Viewer support 3D PDF?


Thanks
Neeraj Dev 
Kammen
Telerik team
 answered on 18 Jul 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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?