Telerik Forums
UI for WPF Forum
1 answer
158 views
I have disabled the context menu for a RadRichTextBox via Xaml like IsContextMenuEnabled="False".
Still a context menu is shown, it look's like a part of the ribbon to set font properties.
You can choose font, background and foreground color, bold, italic etc.
I would like to get rid of this context menu as wel, is this possible and so yes how?

Mike
Telerik team
 answered on 03 Apr 2012
1 answer
102 views
Hy,

I've got a question.
If i have 20 TileViewItem in my TileView as an Example, a Scrollbar automaticaly appear.
Is it Possible to Activate the Pan Feature to this Scrollbar. I need that Feature for a Tablet App

Thank

Alfred
SPARE GmbH
Top achievements
Rank 2
 answered on 03 Apr 2012
2 answers
165 views
Hello telerik support,

this morning i switched from 2011.3.1220.40 to Q1 2012 SP1 and since then the synchronization between GridView
and DataForm rises an exception (Parameter count mismatch).

The first attempt was to switch from OberservableCollection to ICollectionView but that's not the problem.
My project references the sp1 files, but could it be that the versions are mixed during execution?

regards
Chris

Stacktrace:
Parameter count mismatch.

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at Telerik.Windows.Data.ItemPropertyInfoExtensions.GetValue(ItemPropertyInfo itemProperty, Object item)
   at Telerik.Windows.Controls.RadDataForm.PopulatePropertiesInitialValues(Object currentItem)
   at Telerik.Windows.Controls.RadDataForm.OnCurrentItemChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadDataForm.set_CurrentItem(Object value)
   at Telerik.Windows.Controls.RadDataForm.OnItemsCurrentChanged(Object sender, EventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCurrentChanged(EventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCurrentChanged(Object sender, EventArgs args)
   at Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.OnCurrentChanged(EventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPositionCore(Int32 position)
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPosition(Int32 position)
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentTo(Object item)
   at Telerik.Windows.Data.DataItemCollection.MoveCurrentTo(Object item)
   at Telerik.Windows.Data.DataItemCollection.UpdateCurrentItemFromSourceCollection()
   at Telerik.Windows.Data.DataItemCollection.OnSourceCollectionViewCurrentChanged(Object sender, EventArgs args)
   at Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Data.CollectionView.OnCurrentChanged()
   at System.Windows.Data.ListCollectionView.MoveCurrentToPosition(Int32 position)
   at System.Windows.Data.CollectionView.MoveCurrentTo(Object item)
   at Telerik.Windows.Data.DataItemCollection.UpdateSourceCollectionCurrentItem()
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCurrentChanged(Object sender, EventArgs args)
   at Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.OnCurrentChanged(EventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPositionCore(Int32 position)
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentToPosition(Int32 position)
   at Telerik.Windows.Data.QueryableCollectionView.MoveCurrentTo(Object item)
   at Telerik.Windows.Data.DataItemCollection.MoveCurrentTo(Object item)
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.SyncCurrentWithSelected()
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.TrySyncCurrentWithSelected()
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.RaiseSelectionChangedAndSyncCurrentWithSelectedIfNeeded(ItemSelectionChange selectionChange)
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.EndAllowedSelection(ItemSelectionChange selectionChange)
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.EndPendingSelection(ItemSelectionChange pendingSelection)
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.EndSelection()
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.PerformSelection(Object item, SelectionModificationOptions options)
   at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.PerformRowSelection(Object dataItem, SelectionModificationOptions modificationOptions)
   at Telerik.Windows.Controls.GridView.Selection.CellAndRowSelectionDispatcher.HandleSelectionForValidCellInput(GridViewCell cell, SelectionModificationOptions allowedModifications)
   at Telerik.Windows.Controls.GridView.Selection.CellAndRowSelectionDispatcher.HandleSelectionForCellInput(GridViewCell cell, SelectionModificationOptions allowedModifications)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.HandleMouseDownSelection(GridViewCell cell, Boolean allowDrag, Point mousePosition)
   at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.OnMouseDownThunk(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)
Hubert
Top achievements
Rank 1
 answered on 03 Apr 2012
3 answers
221 views
Hi,
I have a problem when using commom column header, I got a null reference exception,
I'm using pdb files to debug telerik gridviiew dll and exception occurs in CommonHeaderPresenter Class and ArrangeLowestHeaders() method.

private void ArrangeLowestHeaders()
        {
 
 
            string lastGroupName = String.Empty;
            CommonColumnHeader lastCommonHeader = null;
            int span = 0;
 
            List<CommonColumnHeader> headers = new List<CommonColumnHeader>();
            for (int i = 0; i < this.OrderedColumns.Count; i++)
            {
                string groupName = this.OrderedColumns[i].ColumnGroupName;
 
                if (lastGroupName != groupName)
                {
                    lastGroupName = groupName;
                    span = 0;
 
                    CommonColumnHeader commonHeader = CreateCommonHeader();
                    this.CommonHeadersGrid.Children.Add(commonHeader);
                    var group = FindGroupByName(groupName, this.ColumnGroups);
                    commonHeader.ColumnGroup = group;
                    commonHeader.Content = CommonHeaderPresenter.GetContent(group);//TODO  this should happen in the header itself.
                    SetTemplateAndStyle(commonHeader, group);
                    commonHeader.SetValue(Grid.ColumnProperty, i);
                    commonHeader.SetValue(Grid.RowProperty, this.RowCount - 1);
                    commonHeader.HorizontalAlignment = HorizontalAlignment.Stretch;
                    headers.Add(commonHeader);
                    lastCommonHeader = commonHeader;
                }
 
                span++;
                lastCommonHeader.SetValue(Grid.ColumnSpanProperty, span);
                if (gridView.FrozenColumnCount > 0)
                {
                    SelectiveScrollingGrid.SetSelectiveScrollingOrientation(lastCommonHeader, SelectiveScrollingOrientation.Vertical);
                }
            }
 
            if (RowCount > 1)
            {
                ArrangeHeadersAtRow(this.RowCount - 2, headers);
            }
        }


To get this bug , set  ColumnGroupName property of the first column of your grid to string.empty or set the first groupName to string empty.
Because lastGroupName = groupName = string.empty,
lastCommonHeader is not initialized and you have a null reference exception at line 142.



										
Pavel Pavlov
Telerik team
 answered on 03 Apr 2012
0 answers
321 views
XAML
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="10" HorizontalAlignment="Center">
    <telerik:RadButton  x:Name="btStartLog" Content="{Binding startStopbuttonText}" IsEnabled="{Binding isEnableTextBox}"
        Command="{Binding startStopLogConfigCommand}" Margin="10" Width="150" Height="40" />
 </StackPanel>
<telerik:RadGridView x:Name="RadGridView1">
    <telerik:GridViewDataColumn Header="To File">
        <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                        <CheckBox HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{Binding IsOnFile}" />
                    </DataTemplate>
        </telerik:GridViewDataColumn.CellTemplate>
            <telerik:GridViewColumn.CellStyle>
            <Style TargetType="telerik:GridViewCell">
                <Setter Property="IsEnabled" Value="{Binding ElementName=btStartLog, Path=IsEnabled}" />
            </Style>
        </telerik:GridViewColumn.CellStyle>
    </telerik:GridViewDataColumn>
</telerik:RadGridView>


I would like to get IsEnabled from Button to set property of Checkbox in Radgridview but when i use code above it not working
please help.
ipOPza
Top achievements
Rank 2
 asked on 03 Apr 2012
1 answer
152 views
I have a screen that contains a radgrid on it, when the user clicks to add a new record and they enter the new info I do a check to see if it is a possible duplicate.  If it is I want to display a Confirm message box that will inform them that it is a possible dup, but allow them to add the record.
I am currently using a messagebox but would like to use a radwindow, but when I add an even hadler I do not see a way to pass the data to the new method.  Or should I try and read the active row of the grid after the confrim?

public void UpdateTransaction(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
       {
           EditData ed = new EditData();
           FundTransaction trans = (FundTransaction)e.NewData;
 
           if (trans.FundID != null && trans.TickerID != null)           {
               string result = ed.EditFundTransaction(trans.TransactionID, trans.FundID); 
               if (result != "")
               {
                   if (MessageBox.Show(result, "Confirmation", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                   {
                       ImportData id = new ImportData();
                       id.AddTransaction(trans.FundID, trans.TickerID);                   }
 
                  }
           }
       }
Ivo
Telerik team
 answered on 03 Apr 2012
6 answers
135 views
Hi,

How to insert the data into the specific row on gridview?

Regards,
Clare
Thomas
Top achievements
Rank 1
 answered on 03 Apr 2012
4 answers
235 views
I have a GridView which the user can Delete rows from.  This works on the screen but I need it to fire a stored procedure to delete records form the data base.  I and using the Deleting Event but I am unsure how to get the data from the items being deleted.  I want to retrive a cell value to pass as a paramater to a stored procedure to delete records from the database.
Nick
Telerik team
 answered on 03 Apr 2012
7 answers
258 views
Are following changes possible
To change color of :  (please view the attached image)
1. View Selector which is currently black
2. Date Header which is currently grayish
3. Task color

To change background of a occurrence of a Task, like in a recurrence task if some occurrences have been completed then there background will be different than those which yet to be started/completed. Similarly for Non - recurrence tasks

If above changes are possible please provide some code to accomplish them

Thanks
Dani
Telerik team
 answered on 03 Apr 2012
1 answer
184 views
BringPathIntoView vertically scrolls my treeview so the end path item is "in view", however the item is hidden to the right because the treeview is in a narrow container.  How can I get the treeview to auto scroll horizontally over so the item is truly in view?

Thanks
Buzz
Petar Mladenov
Telerik team
 answered on 03 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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?