Telerik Forums
UI for WPF Forum
6 answers
356 views
We would like to have "advanced editing" for some cells in the details view: some cells in a row are simple to edit (strings, integers), others are quite complex and using a custom data template with lots of controls make the grid very cumbersome to use and un-pleasant to see.
Anyway, we have bound the data succesfully, but we would like to avoid automatic "commit" of the edit until the user wants to do so (pressing "Enter", clicking a button...)
We tried with a button; in the event handler for click we inserted the line
private void btnSave_Click(object sender, RoutedEventArgs e)
      {
         this.RadGridView1.CommitEdit();        
      }
But to no avail: the selected row grid remains in edit mode, changes are not saved

Which is the correct way to do so?
Thanks,
Lorenzo
Maya
Telerik team
 answered on 07 Jan 2011
3 answers
82 views
I have code that overrides the default appointment edit behavior on double click and opens a seperate UIElement that overlays the ScheduleView for editing the appointment. When I navigate back (ie. push the scheduleview back into view), I get this error... Interestingly, If I walk it through debug, I don't see the error and everything works as I would expect it to. Note that I am not dragging anythiing. I am just merely double clicking on an appt to launch a new UIElement and then having that UIElement go away to have the error occur.

Object reference not set to an instance of an object.
Details: 
  
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.ScheduleViewBase.StartDrag(DragDropQueryEventArgs e, AppointmentItem clickedItem, DragDropState state)
   at Telerik.Windows.Controls.AppointmentItem.OnAppointmentItemsDragQuery(Object sender, DragDropQueryEventArgs e)
   at Telerik.Windows.Controls.DragDrop.DragDropQueryEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.DragDropProvider_DragQuery(Object sender, DragDropQueryEventArgs e)
   at Telerik.Windows.Controls.DragDrop.DragDropProviderBase.RaiseDragQuery()
   at Telerik.Windows.Controls.DragDrop.WPFSimulatedDragDropProvider.TryStartDrag(IMouseEventArgs e)
   at Telerik.Windows.Controls.DragDrop.SimulatedDragDropProvider.OnTrackedElementMouseMoveInternal(IMouseEventArgs e)
   at Telerik.Windows.Controls.DragDrop.SimulatedDragDropProvider.OnCoverRectangleMouseMoveInternal(IMouseEventArgs e)
   at Telerik.Windows.Controls.DragDrop.WPFSimulatedDragDropProvider.OnCoverRectangleMouseMove(Object sender, MouseEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.MouseDevice.Synchronize()
   at System.Windows.Input.MouseDevice.ChangeMouseCapture(IInputElement mouseCapture, IMouseInputProvider providerCapture, CaptureMode captureMode, Int32 timestamp)
   at System.Windows.Input.MouseDevice.Capture(IInputElement element, CaptureMode captureMode)
   at System.Windows.Input.Mouse.Capture(IInputElement element)
   at System.Windows.Documents.Hyperlink.OnMouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   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.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   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)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at Metrix.UI.App.Main() in C:\Users\rodneyy\Documents\Visual Studio 2010\Projects\M530\Client\Metrix.UI\obj\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Rosi
Telerik team
 answered on 07 Jan 2011
2 answers
280 views
I have a GridViewComboBoxColumn bound to a System.Data.DataRow, and I am having trouble using ItemsSourceBinding to bind the items to another column on the row. If I use ItemsSource I have no trouble - see the sample code below.

How should I be using ItemsSourceBinding for a System.Data.DataRow data context?

public partial class MainWindow : Window
{
    public MainWindow()
    {
        StackPanel stackPanel = new StackPanel();
        stackPanel.Children.Add( CreateItemsSourceGridTelerik_WORKING() );
        stackPanel.Children.Add( CreateItemsSourceGridTelerik_NOTWORKING() );
        Content = stackPanel;
    }
  
    public class Node
    {
        public string Description { get; set; }
        public string Code { get; set; }
    }
  
    RadGridView CreateItemsSourceGridTelerik_WORKING()
    {
        RadGridView grid = new RadGridView { AutoGenerateColumns = false };
  
        grid.Columns.Add( new GridViewComboBoxColumn
        {
            DataMemberBinding = new Binding( "Column" ),
            DisplayMemberPath = "Description",
            SelectedValueMemberPath = "Code",
            ItemsSource = new Node[] {
                new Node { Description = "One", Code = "1" },
                new Node { Description = "Two", Code = "2" }
            },
        } );
  
        DataTable table = new DataTable();
        table.Columns.Add( "Column" );
  
        DataRow row = table.NewRow();
        table.Rows.Add( row );
        row[ "Column" ] = "2";
  
        grid.ItemsSource = table.DefaultView;
  
        return grid;
    }
  
    RadGridView CreateItemsSourceGridTelerik_NOTWORKING()
    {
        RadGridView grid = new RadGridView { AutoGenerateColumns = false };
  
        grid.Columns.Add( new GridViewComboBoxColumn
        {
            DataMemberBinding = new Binding( "Column" ),
            DisplayMemberPath = "Description",
            SelectedValueMemberPath = "Code",
            ItemsSourceBinding = new Binding( "ColumnItems" ),
        } );
  
        DataTable table = new DataTable();
        table.Columns.Add( "Column" );
        table.Columns.Add( "ColumnItems" );
  
        DataRow row = table.NewRow();
        table.Rows.Add( row );
        row[ "Column" ] = "2";
        row[ "ColumnItems" ] = new Node[] {
            new Node { Description = "One", Code = "1" },
            new Node { Description = "Two", Code = "2" }
        };
  
        grid.ItemsSource = table.DefaultView;
  
        return grid;
    }
}
Steve
Top achievements
Rank 1
 answered on 06 Jan 2011
7 answers
312 views
Hello,
I need to implement a drag and drop to reorder rows in a RadTreeListView, and to drop items from RadTreeView to the RadTreeListView control.
Do you have some example of this and also example on how to build the dragged tooltip.

Thank you
Tsvyatko
Telerik team
 answered on 06 Jan 2011
11 answers
243 views
Hi,

For one of my customer, I've to load the filter settings of a RadGridView when I load the application, and save them when I quit the application.

How can I do that?

Thank you!
Maya
Telerik team
 answered on 06 Jan 2011
0 answers
144 views
Hi,

       i want to include an editing template in my gridview as per the attachment. Users will be able to add new row only through the editing template (last row) . Also in the template, all the fields by default should be in edit (not in display mode). Is there any way to achieve this? Currently the gridview is allowing only one cell as editable mode by default. Its not allowing the whole row to be in editable mode. The code snippet below is allowing a single cell to be in editable mode.

var rowToEdit = this.grdReferrals.ItemContainerGenerator.ContainerFromItem(this.grdReferrals.SelectedItem) as GridViewRow;
           if (rowToEdit != null)
           {
               GridViewCell currentCell = (GridViewCell)rowToEdit.Cells[0];
               if (null != currentCell)
                   currentCell.IsCurrent = true;
               rowToEdit.BeginEdit();
           }

Expecting a quick reply from you,

Regards,
Saranya.
Saranya
Top achievements
Rank 1
 asked on 06 Jan 2011
3 answers
265 views
Hi guys,

I would like to change a the style of RadDateTimePicker (selection color etc). For that purpose I would like to ask you about default styles for the mentioned control.

P.S. I'd like also to notify about the bug that I've found.
If you will click on the red dot that you will find in attached image the control will disappeared.

Thank you in advance,
Julian
Julian
Top achievements
Rank 1
 answered on 06 Jan 2011
3 answers
67 views
When DragComplete status is hit in my DropInfo handler, I want to update something in the DB. If that fails, I would like the appointment drop to be canceled. How can I achieve this?

Thanks,
Rod
George
Telerik team
 answered on 06 Jan 2011
3 answers
260 views

I was using the radtreeview with quite a lot of nodes and found that performance was slow. I read telerik documentation and it said I can use treelistview as an alternative to treeview. Now when I try to implement loadondemand on this treelist view, during the isexpand property even though the children are added to collection the grid is not refreshed. Since this collection is stored as static variable, when I close the form and open it it displays the parent and children. My isexpanded is implemented in viewmodel where it hits the db and gets the collection. Is there something I am missing in order to implement loadondemand or is this feature not available. I am using WPF Q2 SP1 controls
<
  

<Window.Resources

 

 

 

 

 

<Style x:Key="TreeListViewStyle" TargetType="{x:Type telerik2:TreeListViewRow }">  

 

 

 

<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> 

 

 

 

 

 

</Style>

 

 

 

 

 

 

 

</Window.Resources>

 

 

 

 

 

 

 

 

<telerik:RadTreeListView x:Name="rdTreeList" AutoGenerateColumns="False"

 

 

 

Width="Auto" RowStyle="{StaticResource TreeListViewStyle}"

 

 

 

ItemsSource="{Binding UnitValueObjectList,Mode=TwoWay}"

 

 

 

>

 

 

 

 

 

 

 

<telerik:RadTreeListView.ChildTableDefinitions>

 

 

 

 

 

 

 

<telerik:TreeListViewTableDefinition ItemsSource="{Binding Path=ChildNodes,Mode=TwoWay}" >

 

 

 

 

 

 

 

</telerik:TreeListViewTableDefinition>

 

 

 

 

 

 

 

<telerik:TreeListViewTableDefinition ItemsSource="{Binding Path=ChildNodes,Mode=TwoWay}"/>

 

 

 

 

 

 

 

<telerik:TreeListViewTableDefinition ItemsSource="{Binding Path=ChildNodes,Mode=TwoWay}"/>

 

 

 

 

 

 

 

</telerik:RadTreeListView.ChildTableDefinitions>

 

 

 

 

 

 

 

<telerik:RadTreeListView.Columns>

 

 

 

 

 

 

 

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name,Mode=TwoWay}" Header="Name" />

 

 

 

 

 

 

 

</telerik:RadTreeListView.Columns>

 

 

 

 

 

 

 

</telerik:RadTreeListView>

 

 

>

 

 

 

Vlad
Telerik team
 answered on 05 Jan 2011
2 answers
102 views
Hello,

I am unable to change the GroupPanel style through WPF resource dictionary :

<Style TargetType="{x:Type telerik:GridViewGroupPanel}">
        <Setter Property="BorderThickness" Value="5"/>
</Style>

I have already used ms Blend to edit a copy of the whole GridView template into my dicitionary. When i tried to 'Edit A Copy' on the GridViewGroupPanel, the only option available is 'Create Empty'. Anyhow, GroupPanel stays 'UnTouchable'.

How can i control the visualiztion of group panel?

Thanks,
Oran
Oran
Top achievements
Rank 1
 answered on 05 Jan 2011
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
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?