Telerik Forums
UI for WPF Forum
1 answer
149 views
Hi,

I have a GridViewComboBoxColumn defined in my GridView in Xaml.  I have it set up to bind properly when I set the ItemsSource property on the GridView itself.  That works great.  I would like to know how to hide the combobox that is generated in specific rows when the Grid is bound based on certain criteria of the data items for each row.  How do I do this?

Thanks.
Maya
Telerik team
 answered on 06 Dec 2010
5 answers
320 views
Hi,

        Now i m using the telerik rad map for show the details, and want to bind the shape file, but unfortunately i m using telerik q1 version, so i can't able to directly use that shape file, so i convert that as a kml file format. Now its working but i using some sample kml data's which is provided by telerik examples. but  when i look a deep look in my converted kml file, i see the values are in X,Y Values, so that i don't know How to bind this values in to the rad map, even weather rad map ll support this values or not i don't know, So plz

Explain me how to handle this, and how to convert the XY values in to decimal  latitude & Longitude.

Are any way to bind the xy values directly in the rad map control, using kml file.

Thank you
Andrey
Telerik team
 answered on 06 Dec 2010
3 answers
215 views
<telerik:RadGridView x:Name="rgvData" CanUserFreezeColumns="False" GridLinesVisibility="Horizontal" IsReadOnly="False" AutoGenerateColumns="False"
                             telerik:Theming.Theme="Office_Blue" ItemsSource="{Binding}" >
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding StudentID}" Header="Category ID" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding StudentFN}" Header="Category Name" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding StudentLN}" Header="Description" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Picture}" Header="Picture" />
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView x:Name="RadGridView1" Loaded="rgvData_Loaded" ShowInsertRow="True"  CanUserInsertRows="True"  ItemsSource="{Binding Subjects}" CanUserFreezeColumns="False" AutoGenerateColumns="False" ShowGroupPanel="False" IsReadOnly="False">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding SubjectID}" Header="Order ID" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding SubjectName}" Header="Employee ID" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding SubjectProfessor}" Header="Order Date" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding ShipCountry}" Header="Ship Country" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>

Here's my mainxaml.cs
public partial class MainWindow : Window
    {
        DataAccessDataContext m_dcData;
        public MainWindow()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
            this.rgvData.Items.CollectionChanged += new NotifyCollectionChangedEventHandler(Items_CollectionChanged);
            rgvData.Filtered += new EventHandler<Telerik.Windows.Controls.GridView.GridViewFilteredEventArgs>(rgvData_Filtered);
        }
 
        void rgvData_Loaded(object sender, RoutedEventArgs e)
        {
            var childGrid = (RadGridView)sender;
        var parentRow = childGrid.ParentRow;
 
        if (parentRow != null)
        {
            rgvData.SelectedItem = childGrid.DataContext;
            parentRow.IsExpandedChanged += new RoutedEventHandler(parentRow_IsExpandedChanged);
        }
         }
 
    void parentRow_IsExpandedChanged(object sender, RoutedEventArgs e)
    {
        rgvData.SelectedItem = ((GridViewRow)sender).DataContext;
    }x
         
 
        void rgvData_Filtered(object sender, Telerik.Windows.Controls.GridView.GridViewFilteredEventArgs e)
        {
            DataContext = m_dcData;
            m_dcData = new DataAccessDataContext();
            m_dcData.Log = Console.Out;
            rgvData.ItemsSource = m_dcData.Students;
            rgvData.ShowInsertRow = true;
        }
 
        private void Items_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            try
            {
                if (e.Action == NotifyCollectionChangedAction.Add)
                {
                    foreach (Student item in e.NewItems)
                    {
                        m_dcData.Students.InsertOnSubmit(item);
                    }
                }
                if (e.Action == NotifyCollectionChangedAction.Remove)
                {
                    foreach (Student item in e.OldItems)
                    {
                        m_dcData.Students.DeleteOnSubmit(item);
                    }
                }
            }
            catch (Exception s)
            { }
        }
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            m_dcData = new DataAccessDataContext();
            m_dcData.Log = Console.Out;
            rgvData.ItemsSource = m_dcData.Students;
            rgvData.ShowInsertRow = true;
 
            rgvData.ItemsSource = m_dcData.Students;
            rgvData.ShowInsertRow = true;
        }
    }


Hi I have no problem on loading the child data related to its parent source. The problem is that if I try to expand another row it loads the first data for it. Example is if I have row1 expanded it displays the correct child table but if I go to row2 and expand it, its child records are for row1. I tried looking for the answer and putting the parent_IsExpandedChanged event to handle it but still it wont display the correct data. If I try to reload the application again and try to expand row 2 or row 3. its child is correct but if i expanded another row it will display the child for row 2 or row 3. Please help what am i doing wrong
Maya
Telerik team
 answered on 06 Dec 2010
1 answer
74 views
How do I upgrade my Q2 telerik wpf to Q3? I tried searching cant find any
Vlad
Telerik team
 answered on 06 Dec 2010
6 answers
137 views
I get a NullReferenceException after clicking the GridView filter button in the following scenario:

1. The GridView has too many columns to fit in the current window so it has horizontal scroll bars.
2. I scroll the GridView content to the left so that column A is not visible anymore because it is now too much to the left.
3. I scroll back to the right so that column A is visible again.
4. I click the filter button of column A.
5. NullReferenceException is thrown.

I use the official Q3 2010 release of the GridView control.

Here are the exception details:

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.FilteringDropDown.OnDropDownPopupOpened(Object sender, EventArgs e) in c:\Dev3\branches\2010.Q3.Release\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 333
       at System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall)
       at System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       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.GridView.FilteringDropDown.OnIsDropDownOpenChanged(Boolean oldValue, Boolean newValue) in c:\Dev3\branches\2010.Q3.Release\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 129
       at Telerik.Windows.Controls.GridView.FilteringDropDown.OnIsDropDownOpenChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\Dev3\branches\2010.Q3.Release\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 75
       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.GridView.FilteringDropDown.set_IsDropDownOpen(Boolean value) in c:\Dev3\branches\2010.Q3.Release\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 64
       at Telerik.Windows.Controls.GridView.FilteringDropDown.OnDropDownButtonClick(Object sender, RoutedEventArgs e) in c:\Dev3\branches\2010.Q3.Release\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 349
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(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.UIElement.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 dcits.AdminClient.Controller.Main()
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:
David Bass
Top achievements
Rank 1
 answered on 06 Dec 2010
1 answer
102 views
Is there any flag for GridView rows that tells me if the user has changed a row or the row has been added recently? I need to traverse all the rows that are changed/inserted then update our database.
Thanks,
Milan
Telerik team
 answered on 05 Dec 2010
1 answer
61 views
Hi,
          thanks for reading my thread.
i am using rad gridview in my latest project.
here i want to create a labelbox in particular column
in rad gridview.
(here i am create 2 columns first column labelbox  second column
textbox)
 pls help me some code.


we are waiting for ur reply.(more then 8 members.)
thanks.
Rossen Hristov
Telerik team
 answered on 04 Dec 2010
2 answers
82 views
Hello
I am trying to catch the event of splitting of a raddock , but I can not handle it .
I tried PaneStateChange event ,it works for the changing position of panes but when we split the container it does not work.
Would you help me please;

Khaldoun
Top achievements
Rank 1
 answered on 03 Dec 2010
4 answers
108 views
I am binding my RadCarousel to a Generic List and cannot get my binding setup correctly. I have the following XAML for my CarouselDataRecordPresenter and this is where my binding is setup:

SceneCarousel.xaml
<Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
                <carousel:CarouselItem DataItem="{Binding Path=CarouselItems}" />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Below that, my Carousel is setup like so: 
SceneCarousel.xaml
<telerik:RadCarousel Name="Scenes" Background="Transparent" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled" Loaded="LoadCarousel">
    <telerik:RadCarousel.ItemsPanel>
        <ItemsPanelTemplate>
            <telerik:RadCarouselPanel AutoLoadItems="false" ItemsPerPage="5" TopContainerChanged="RadCarouselPanel_TopContainerChanged" />
        </ItemsPanelTemplate>
    </telerik:RadCarousel.ItemsPanel>
</telerik:RadCarousel>

I am trying to bind to a List<CarouselDataItem> which is this class:
CarouselDataItem.cs
public class CarouselDataItem
{
    public SceneReference Reference { get; set; }
    public string ImagePath { get; set; }
    public Stretch ImageStretch { get; set; }
    public HorizontalAlignment TitleAlignment { get; set; }
    public Visibility ShowDeleteButton { get; set; }
    public bool AddScene { get; set; }
}

My issue is getting the DataItem to pass to my CarouselItem UserControl because I don't know how to setup the binding. Whatever I need to put in place of "{Binding Path=CarouselItems}", I can't figure out because it always comes up NULL in my CarouselItem UserControl. 
Maya
Telerik team
 answered on 03 Dec 2010
1 answer
149 views
Hi,

I just want to disable the resize animations when first open the titleview control and remain the tile exchange animation, who to do that?

I find that if set the IsItemsAnimationEnabled property to "false", all the animations are disabled :(

Regards,
LP
Zarko
Telerik team
 answered on 03 Dec 2010
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?