Telerik Forums
UI for WPF Forum
1 answer
134 views
When the ItemsSource property is set by a background task (periodic timer), the RadPanelBar resets, i.e. the panels collapse and the selected item highlight disappears.

I have implemented a cache to save the state of the RadPanelBar and RadPanelBarItems so that it can be restored to its original state, after the ItemsSource property has been set. However this is causing a horrible flicker.

Is there a way to maintain the state of the RadPanelBar after the ItemsSource property has been set without having to do manually?

Would binding to an ObservableCollection instead make any difference?
(admittedly perhaps I should have done this in the first place, but didn't know about it until recently).

Thanks.
Tihomir Petkov
Telerik team
 answered on 04 Nov 2009
1 answer
78 views
Hi Guys,

I was using the Telerik dll version 2009.2.701. something. At that time, if I switch the positions of two records, I would not lose the focus/selection on the original record. But after I upgraded to 2009.2.813. something, I am losing the focus after I switch the records. What I am trying to do now is to manually set the grid.Records[1].IsSelected = true. But it is not working. Any suggestions?

Thanks,
Milan
Telerik team
 answered on 04 Nov 2009
3 answers
283 views
Hi,
I have a button inside a stack panel in a carousel  control and I want to fire a click event  in that button but It does nothing.
Can you please help?  I am try to pop up another window when user click on a button ( details of that particular selected item) . Moreover how do I get the ID of a selected item.
Thank you
Jeewan Thapa
Milan
Telerik team
 answered on 04 Nov 2009
1 answer
59 views
Hi  ..
how can I freez the first column when the user scroll the grid to the right (similar to what you can do in excell for example)

Thanks
Wisam

Vlad
Telerik team
 answered on 04 Nov 2009
2 answers
103 views
Hi,

I am having a few issues with consuming datasets with the wpf grid. I have viewed the demos etc but cannot resolve this one.

The problem is the GridViewComboBoxColumn does not display the Display member on load, and when an item is selected in the employee column, and I navigate away, the value selected is not persisted in the grid row.

I have created a small example to show the problem. The codebehind is VB, as that is the language used for this cutover.

<Window x:Class="Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    Title="Window1" WindowState="Maximized">  
    <Grid> 
        <telerik:RadGridView   
                        AutoGenerateColumns="False" 
                        HorizontalAlignment="Right"   
                        IsFilteringAllowed="False" 
                        CanUserFreezeColumns="False"   
                        CanUserReorderColumns="False"   
                        IsEnabled="True" 
                        ColumnsWidthMode="Auto" 
                        CanUserSortColumns="False"                  
                        ShowGroupPanel="False" 
                        ItemsSource="{Binding Tables[Labour.EmployeeLeave]}" 
                        > 
            <telerik:RadGridView.Columns> 
                <telerik:GridViewComboBoxColumn   
                                Header="Employee"   
                                DataMemberBinding="{Binding EmpNum, Mode=TwoWay}" 
                                SelectedValueMemberPath="EmpNum" 
                                DisplayMemberPath="Fullname" 
                                ItemsSource="{Binding}"   
                                DataContext="{Binding Tables[Labour.Employee]}"/>  
                <telerik:GridViewDataColumn Header="Leave Type" UniqueName="LeaveCode" /> 
                <telerik:GridViewDataColumn Header="Date From" UniqueName="DateFrom" /> 
                <telerik:GridViewDataColumn Header="Date To" UniqueName="DateTo" /> 
                <telerik:GridViewDataColumn Header="Hours" UniqueName="Hours" /> 
                <telerik:GridViewDataColumn Header="Pay In Advance" UniqueName="PayInAdvance"/>  
                <telerik:GridViewDataColumn Header="Comments" UniqueName="Comments" /> 
                <telerik:GridViewDataColumn Header="Total Made" UniqueName="TotalMade" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Window> 
 

 

 

 

 

Imports System.Data  
 
Class Window1  
 
    Public Sub New()  
        InitializeComponent()  
        Dim ds As New DataSet  
        Dim dt As New DataTable("Labour.Employee")  
        Me.BuildEmployeesTable(dt)  
        ds.Tables.Add(dt)  
        dt = New DataTable("Labour.EmployeeLeave")  
        Me.BuildEmployeeLeaveTable(dt)  
        ds.Tables.Add(dt)  
        Me.DataContext = ds  
    End Sub 
 
    Private Sub BuildEmployeesTable(ByVal dt As DataTable)  
        dt.Columns.Add("EmpNum"GetType(System.Int32))  
        dt.Columns.Add("Firstname"GetType(System.String))  
        dt.Columns.Add("Surname"GetType(System.String))  
        dt.Columns.Add("Fullname"GetType(System.String), "Firstname+' '+Surname")  
        Me.AdddEmployeesRow(dt, 1, "Joe""Blogs")  
        Me.AdddEmployeesRow(dt, 2, "John""Doe")  
        Me.AdddEmployeesRow(dt, 3, "Mary""May")  
    End Sub 
 
    Private Sub BuildEmployeeLeaveTable(ByVal dt As DataTable)  
        dt.Columns.Add("EmpNum"GetType(System.Int32))  
        dt.Columns.Add("LeaveCode"GetType(System.String))  
        dt.Columns.Add("DateFrom"GetType(System.DateTime))  
        dt.Columns.Add("DateTo"GetType(System.DateTime))  
        dt.Columns.Add("Hours"GetType(System.Int32))  
        dt.Columns.Add("PayInAdvance"GetType(System.Boolean))  
        dt.Columns.Add("Comments"GetType(System.String))  
        dt.Columns.Add("TotalMade"GetType(String), "Comments+Hours")  
        Me.AdddEmployeeLeaveRow(dt, 1, "sss", Now, Now, 55, True"comment")  
        Me.AdddEmployeeLeaveRow(dt, 2, "sss", Now, Now, 22, True"comment")  
        Me.AdddEmployeeLeaveRow(dt, 3, "sss", Now, Now, 33, True"comment")  
    End Sub 
 
    Private Sub AdddEmployeesRow(ByVal dt As DataTable, ByVal id As IntegerByVal fname As StringByVal lname As String)  
        Dim dr As DataRow = dt.NewRow()  
        dr("EmpNum") = id  
        dr("Firstname") = fname  
        dr("Surname") = lname  
        dt.Rows.Add(dr)  
    End Sub 
 
    Private Sub AdddEmployeeLeaveRow(ByVal dt As DataTable, ByVal id As IntegerByVal LeaveCode As StringByVal DateFrom As DateTime, ByVal DateTo As DateTime, ByVal Hours As IntegerByVal PayInAdvance As BooleanByVal Comments As String)  
        Dim dr As DataRow = dt.NewRow()  
        dr("EmpNum") = id  
        dr("LeaveCode") = LeaveCode  
        dr("DateFrom") = DateFrom  
        dr("DateTo") = DateTo  
        dr("Hours") = Hours  
        dr("PayInAdvance") = PayInAdvance  
        dr("Comments") = Comments  
        dt.Rows.Add(dr)  
    End Sub 
 
End Class 
 

Please offer some advice.

Regards,
Nic

 

 

 

 

Nic Roche
Top achievements
Rank 1
 answered on 04 Nov 2009
1 answer
157 views

I am trying to databing a datatable result in XAML (declarative databinding). I tried it programmatically and it does work by setting the Itemsource of my radcarousel to the datatable in code. Can you please tell me where i am going wrong with my ObjectDataProvider.

XAML code:

<Window x:Class="TelerikCarousel.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
xmlns:carousel="clrnamespace:Telerik.Windows.Controls.Carousel;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:telerikT="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    xmlns:local="clr-namespace:TelerikCarousel" 
    Title="Window1" Height="800" Width="800" Background="DarkBlue">  
    <Window.Resources> 
        <ObjectDataProvider x:Key="objectDataProvider" ObjectType="{x:Type local:Window1}" MethodName="InserRow" /> 
    </Window.Resources> 
      
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="280*" /> 
            <RowDefinition Height="482*" /> 
        </Grid.RowDefinitions> 
        <Grid.Resources> 
               <!-- removed the carousel stylings so it could be shorter but it does work --> 
</GridResources> 
  <telerik:RadCarousel Margin="19,51,22,293" Name="radCarousel1" ItemsSource="{Binding Source={StaticResource objectDataProvider}}" Grid.RowSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" > 
            
        </telerik:RadCarousel> 
 
    </Grid> 
</Window> 

c# Code:
using System;  
using System.Windows;  
using System.Windows.Media;  
using System.Windows.Shapes;  
using System.Data.SqlClient;  
using System.Data;  
using Telerik.Windows.Controls;  
 
namespace TelerikCarousel  
{  
    /// <summary>  
    /// Interaction logic for Window1.xaml  
    /// </summary>  
    public partial class Window1 : Window  
    {  
        public Window1()  
        {  
            InitializeComponent();  
              
            //object itemsSource = radCarousel1.ItemsSource;  
            this.radCarousel1.Loaded += new RoutedEventHandler(radCarousel1_Loaded);  
        }  
 
        void radCarousel1_Loaded(object sender, RoutedEventArgs e)  
        {  
            Path path = CreateLinePath();  
            RadCarouselPanel panel = this.radCarousel1.FindCarouselPanel();  
            panel.ItemsPerPage = 5;  
            panel.Path = path;  
            this.radCarousel1.ReflectionSettings.Visibility = Visibility.Visible;  
            this.radCarousel1.ReflectionSettings.Opacity = 0.5;  
       
 
        }  
 
        private Path CreateLinePath()  
        {  
            Path newPath = new Path();  
            PathFigureCollectionConverter figureConverter = new PathFigureCollectionConverter();  
            object geometryFigures = figureConverter.ConvertFromString("M30,347 L307.5,347");  
            PathGeometry newGeometry = new PathGeometry();  
            newPath.Stretch = Stretch.Fill;  
            BrushConverter brushConverter = new BrushConverter();  
            newPath.Stroke = (Brush)brushConverter.ConvertFromString("#FF0998f8");  
            newPath.StrokeThickness = 2;  
            newGeometry.Figures = (PathFigureCollection)geometryFigures;  
            newPath.Data = (Geometry)newGeometry;  
            return newPath;  
        }  
 
        //public DataSet dataset = new DataSet("MedSpaImage");  
        public DataTable dt = new DataTable("Medxx");  
 
        public DataTable InserRow()  
        {  
            string myConnectionstring = "";  
            if (myConnectionstring == "")  
            {  
                myConnectionstring = "Initial Catalog=MedSpa;Data Source=4DBQR61\\IMSERVER;Integrated Security=True";  
            }  
 
            try 
            {  
                SqlConnection myConnection = new SqlConnection(myConnectionstring);  
                string myInsertQuery = "SELECT * FROM Testing";  
                SqlCommand myCommand = new SqlCommand(myInsertQuery);  
                myCommand.Connection = myConnection;  
                SqlDataAdapter adapter = new SqlDataAdapter();  
                myConnection.Open();  
                adapter.SelectCommand = new SqlCommand(myInsertQuery, myConnection);  
                adapter.Fill(dt);  
                myCommand.ExecuteNonQuery();  
                myCommand.Connection.Close();  
            }  
            catch (Exception ex)  
            {  
                MessageBox.Show(ex.ToString());  
            }  
            return dt;  
        }  
 
        
    }  
}  
 

I am just playing with a datable. My ultimate goal would be to be able to databind in XAML the carousel with a property of type ObservableCollection<>. Is that even possible? Thanks
Milan
Telerik team
 answered on 03 Nov 2009
4 answers
134 views
HI Guys,

This really drives me nuts.

I have a radgridview control and I set the CanUserResizeColumns=True and for each column's setting I have set isResizable=True as well. However, I am still unable to resize the columns by dragging the mouse. Did I miss anything? When I place the mouse in between two columns' headers, I don't even see that 'line seperator'.

Thanks,
sum sum
Top achievements
Rank 1
 answered on 03 Nov 2009
2 answers
116 views
Hi Everyone,

First of all - I'm new to telerik's controls, and I like what I see so far... great job!

I've started using the RadGridView control for a project of mine and encountered the following questions. I would greatly appreciate your help here:

1. How do I remove the left-most column (not a data column, whenever a row is selected it has a little right arrow in it)?
2. I've added a Combo column which works great, except for one little thing --- it is impossible to know that the column's cell is a combo box until the user actually double clicks on it. Is there a way to make it appear and respond as a combo box straight off?
3. Whenever a row is selected, I would like to display a set of content below it (description on the item, a list of other relevant items, etc.). How do I do this?
4. I've used a GroupDescription which works well, however, the value by which the rows are grouped does not appear in the group's title. What am I doing wrong?

Thank you for your help!
yonadav
yonadav
Top achievements
Rank 1
 answered on 03 Nov 2009
3 answers
100 views
We just got the latest beta release 2009.3.1023.35 and we are getting a NullReferenceException exception while the grid attempts to apply a header template.

 System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.Windows.Controls.GridView"
  StackTrace:
       at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnApplyTemplate() in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewHeaderCell.cs:line 515
       at System.Windows.FrameworkElement.ApplyTemplate()
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureChild(UIElement child, Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 485
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChild(IItemContainerGenerator generator, Size constraint, GridViewColumn column, Int32& childIndex, Size& childSize) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 1015
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.EnsureAtleastOneHeader(IItemContainerGenerator generator, Size constraint, List`1 realizedColumnIndices, List`1 realizedColumnDisplayIndices) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 831
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.DetermineRealizedColumnsBlockList(Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 786
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 438
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
       at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 5772
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(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, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Iti.Ccs.Shell.App.Main() in C:\Users\arodriguez.EN3SOFTWARE\ITI.CCS.AR20091014\Source\Iti.Ccs.Shell\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:
Stefan Dobrev
Telerik team
 answered on 03 Nov 2009
1 answer
334 views
I have used radgridview with celltemplate for column. I am not able to call  RowEditEnded or  CellEditEnded eventhandler on click of cell to edit the cell value. If I removed celltemplate used for binding, then it is working fine and corresponding celledittemplate is displaying and RowEditEnded or  CellEditEnded event handler is also invoking.But, if I am putting both inside GridViewDataColumn tag, it is not working. I am putting my code below for reference.



  <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=FirstName}">
                 <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox BorderThickness="0" Text= "{Binding FirstName}" Foreground="#0066cc"   Width="100" TextAlignment="Center" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                    <telerik:GridViewColumn.CellEditTemplate>
                        <DataTemplate>
                            <TextBox BorderThickness="0" Text= "{Binding FirstName,Mode=TwoWay}" Foreground="#0066cc"   Width="100" TextAlignment="Center" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

Please help me in that. I just want to call RowEditEnded or  CellEditEnded  method on click of cell for editing purpose. But that cell using celltemplate. It is very very urgent.

Nedyalko Nikolov
Telerik team
 answered on 03 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?