Telerik Forums
UI for WPF Forum
1 answer
133 views
I have a tool window (based on System.Windows.Window) which floats on top of my main window.  The tool window has a listbox with items I want to drag to various parts of the main window.

I can initiate a drag operation, but as soon as the mouse gets to the border of the tool window, the drag image gets stuck while the mouse moves on.  My targets never receive any QueryDrop events.

This project is being developed using Prism.  On the Silverlight side, I have a similar tool list hosted in a RadWindow, and drag/drop works great.  I've also tried using RadWindow on the WPF side, but I still have the same problem.

This is the trial version of Telerik.Windows.Controls.dll - Version 2009.2.724.1020


Thanks for you help!


Miroslav
Telerik team
 answered on 23 Oct 2009
1 answer
318 views
Hi,

I am using Treeview to show a recursive data structure. I would like to get the item when mouse is over, process the value of the item and show tooltip.

How can I get the item?

Thanks,
Tihomir Petkov
Telerik team
 answered on 23 Oct 2009
12 answers
594 views
Any examples of dragging a row from RadGridView onto another control using the RadDragAndDropManager?    
Miroslav
Telerik team
 answered on 23 Oct 2009
1 answer
148 views
Hi,

i have a radgrid which i has a edit form ( which is a usercontrol ), and a select column ( which is a check box ).
the issue is i am facing is when ever i open my usercontrol ( i.e the edit form ), and check the select column the details in the row disapper. and they appear back as soon as the select column check box is deselected.

please let me know how can i resolve this issue.

here is part of the code from my grid view

<telerik:RadGrid ID="rgCampaignList" EnableViewState="true" Height="100%" GridLines="none"
                    runat="server" AllowSorting="true" AllowMultiRowSelection="True" AllowAutomaticDeletes="true"
                    CssClass="GridMedium" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
                    AllowPaging="True" AllowFilteringByColumn="true" AutoGenerateColumns="false">
                    <HeaderContextMenu BackColor="White">
                    </HeaderContextMenu>
                    <HeaderStyle Font-Bold="true" Wrap="true" />
                    <PagerStyle AlwaysVisible="true" Visible="true" Position="topAndBottom" />
                    <MasterTableView GridLines="none" EnableViewState="true" Height="100%" EditMode="EditForms"
                        runat="server">
                        <PagerStyle AlwaysVisible="true" Visible="true" Position="topAndBottom" />
                        <Columns>
                            <telerik:GridClientSelectColumn UniqueName="campapignsSelectColumn" HeaderText="Actions"
                                HeaderStyle-Width="20" Reorderable="false" />
                            <telerik:GridEditCommandColumn HeaderText="Edit" ButtonType="LinkButton" UniqueName="EditCommandColumn"
                                EditFormHeaderTextFormat="Edit Campaign" Reorderable="false">
                            </telerik:GridEditCommandColumn>
                            <telerik:GridTemplateColumn DataType="System.String" DataField="CampaignName" UniqueName="CampaignName"
                                SortExpression="CampaignName" HeaderText="Campaign">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnCampaignName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CampaignName") %>'
                                        CommandName="SelectCampaign" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="DivisionName" UniqueName="DivisionName" HeaderText="Division"
                                DataType="System.String" SortExpression="DivisionName">
                                <FilterTemplate>
                                    <telerik:RadComboBox ID="RadComboBoxDivision" DataSourceID="SqlDataSourceDivisions"
                                        DataTextField="DivisionName" DataValueField="DivisionName" AppendDataBoundItems="true"
                                        runat="server" SelectedValue='<%# (container).OwnerTableView.GetColumn("DivisionName").CurrentFilterValue %>'
                                        OnClientSelectedIndexChanged="Division">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="---" />
                                        </Items>
                                    </telerik:RadComboBox>
                                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

                                        <script type="text/javascript">
                                    function Division(sender,args) {
                                        var tableView=$find("<%# (container).OwnerTableView.ClientID %>");
                                        if (args.get_item().get_value()!="-1")
                                        {
                                         tableView.filter("DivisionName",args.get_item().get_value(),"EqualTo");
                                        }
                                        else
                                        {
                                        tableView.filter("DivisionName",args.get_item().get_value(),"NoFilter");
                                        }
                                        
                                    }
                                        </script>

                                    </telerik:RadScriptBlock>
                                </FilterTemplate>
                            </telerik:GridBoundColumn>
                            ........
                            .............
                            ..................

                        </Columns>
                        <EditFormSettings FormMainTableStyle-BackColor="#FFFFE0" FormStyle-Height="100%"
                            FormStyle-Width="100%" FormCaptionStyle-Height="100%" EditColumn-Resizable="true"
                            UserControlName="../usercontrols/Campaigns_Edit.ascx" EditFormType="WebUserControl">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="reorder">
                        <DataBinding FilterParameterName="campaignname" FilterParameterType="String">
                        </DataBinding>
                        <ClientEvents OnRowDeselected="RowDeselected" OnRowSelected="RowSelected" />
                        <Selecting EnableDragToSelectRows="true" AllowRowSelect="True"></Selecting>
                    </ClientSettings>
                    <AlternatingItemStyle CssClass="GridMediumAlternate" />
                    <SelectedItemStyle CssClass="GridMediumSelected" />
                </telerik:RadGrid>


                    only the edit column and the campaign name column details are visible when we select the checkbox, the rest of the columns which are like 21 columns are hidden,

please help me out on this issue as this is important to the client.

thank you for your help in advance.




               
Vlad
Telerik team
 answered on 23 Oct 2009
1 answer
174 views
In code like this...

                pagesGridView.GroupDescriptors.Add(  
                    new GroupDescriptor {   
                        Member = "CmsPageParent.Title",   
                        SortDirection = ListSortDirection.Ascending   
                    }  
                ); 

How do I set the "title" property of the group? I need to simulate the grouping of a column named “Parent” – as far as I can see I cannot mark a column as a default grouping set so I need to do it programmatically. However when I do it this way the resulting item in the group header says “CmsPageParent.Title” not “Parent” as the header for the same column would.

Ideas?

Pavel Pavlov
Telerik team
 answered on 23 Oct 2009
1 answer
128 views
How do I install the trial version of WPF into VS2008?

The .zip file contains a Bin3/Documentation/Demos folders, but I can't find an installation file.

I can't seem to locate any help file to assist.

Thanks.
Milan
Telerik team
 answered on 23 Oct 2009
2 answers
179 views
Getting used to the impressive speed and ease at which we can create a brilliant interface with the telerik winforms controls , I find myself wondering about WPF.

WPF is awesome in terms of flexibility and customisation capabilities. It's awesome in terms of performance too. Because of that , all I saw in my mind of the WPF versions of the telerik controls was just winforms x 10.

But we get to the new release of the second beta of the eagerly awaited Q3 release and while the new ribbonbar is as great as expected , it's a far contrast from the winforms one. Suddenly the gap in designer capability differences in what microsoft provides for wpf and winforms becomes exceptionally painful.

Doing a simple ribbonbar is suddenly a ream of code and by no means rad. :/ So all of a sudden when the complexitiy of controls goes up (and let's face it one of the strengths of wpf is in the ability to easily build complex/layered controls) then suddenly it becomes MORE time consuming to create these controls.

So I suppose my point is the concept of xaml is lovely when the complexity of the controls is below a certain level , in fact at that level or below you can create more complex controls than winforms with much less code and time investment. But past a certain point , the code and time investment needed is far greater.

I love the new WPF ribbon bar but creating a ribbon feels really tedious not to mention that once complexity builds on the ribbon , parts of it just don't feel or look intuitive at all. Right now I would dread developing a serious ribbonbar for a serious application and then needing to do even simple changes to it.

Anyone else feel like microsoft are really slacking with wpf designer capability ? Or am I just missing something ?
Antonio
Top achievements
Rank 1
 answered on 22 Oct 2009
1 answer
88 views
I have two tables having one to one mapping :
for instance:
1) VEHICLE_DATA:Vehicle_type,termleased(columns)
2)VEHICLE_TYPE:Vehicle_type,vehicle_name,Owned

Now I am having IList<VEHICLE_DATA>(having VEHICLE_TYPE property) list  which I m binding to Gridview
radGridView1.ItemsSource=list;

and in Xaml in one of the column of grid I am specifying {Binding Path=vehicle_name}
It doesn't give any error,but doesn't display vehicle_name in grid.

Please help me for this ASAP.

Vlad
Telerik team
 answered on 22 Oct 2009
5 answers
115 views
Using the gridview setup below...

        <telerik:RadGridView Grid.Row="1" Name="pagesGridView" telerik:StyleManager.Theme="Vista" DataLoadMode="Synchronous" AutoGenerateColumns="False" CanUserInsertRows="False" CanUserFreezeColumns="False" UseAlternateRowStyle="True" ColumnsWidthMode="Auto" ShowGroupPanel="True" SourceUpdated="pagesGridView_SourceUpdated">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn  x:Name="ParentColumn" HeaderText="Parent"  Width="200" DataMemberBinding="{Binding Path=CmsPageParent.Title}" /> 
                <telerik:GridViewDataColumn  x:Name="StatusColumn" HeaderText="Status"  Width="200" DataMemberBinding="{Binding Path=CmsItemState.Name}" /> 
                <telerik:GridViewDataColumn  x:Name="Title" HeaderText="Name"  Width="*" DataMemberBinding="{Binding Path=Title}" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 

  • The simple column (Title) acts as you would expect, it can be grouped by, sorted and fitered
  • The complex rows (Paren and Status) canot be grouped, sored  filtered.This looks like a bug in the grid
  • If you set the grouping manually, you can group by the parent column, however the grouping is NOT re-parsed when the data updates... this is another serious flaw

Any help?

Kenneth Jamieson
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
194 views
Dear team,

I have a problem when setting the IsDropDownOpenProperty on a RadComboBox, Yes, I know there's a similar post (that I've read) but that did not help me to solve my problem. ;)
I have a RadGridView, where the CellEditTemplate of a given column must change at runtime, depending on the type of row that is currently being edited.
So I have an event handler at the RadGridView SelectionChanged event, that determines the type of row (meaning the type of data we have inside it), and then dinamically builds a DataTemplate that is assigned to the grid column.
In one particular case, this template is a RadComboBox with a set of available values, and the core instructions that build this template are the followings:

FrameworkElementFactory radComboFactory = new FrameworkElementFactory ( typeof ( RadComboBox ), "RadComboFactory" ); 
radComboFactory.SetValue ( RadComboBox.ItemsSourceProperty, property.AvailableValues ); 
radComboFactory.SetValue ( RadComboBox.SelectedValuePathProperty, "Key" ); 
radComboFactory.SetValue ( RadComboBox.SelectedValueProperty, currentValue ); 
radComboFactory.SetValue ( RadComboBox.IsDropDownOpenProperty, true ); 
radComboFactory.SetValue ( CSRadComboSelectionChanged.CommandProperty, CellEditTemplateComboSelectionChange ); 
propertyDataTemplate.VisualTree = radComboFactory; 
propertyDataTemplate.Seal ( ); 

Everything worked fine, until I introduced the 4th dependecy property, which is RadComboBox.IsDropDownOpenProperty because I clearly wanted the combo box to be displayed already opened.
The template is built correctly, but this gives me an error when it is going to be instantiated into my RadGridView's column.
The exception details are:
System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.Windows.Controls.Input"
  StackTrace:
   at Telerik.Windows.Controls.RadComboBox.OnIsDropDownOpenChanged(Boolean oldValue, Boolean newValue) 
   at Telerik.Windows.Controls.RadComboBox.OnIsDropDownOpenChanged(DependencyObject sender, 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, OperationType operationType) 
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) 
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 
   at System.Windows.FrameworkTemplate.SetTemplateParentValues(String name, Object element, FrameworkTemplate frameworkTemplate, ProvideValueServiceProvider& provideValueServiceProvider) 
   at System.Windows.FrameworkElementFactory.InstantiateUnoptimizedTree() 
   at System.Windows.FrameworkTemplate.LoadContent() 
   at Telerik.Windows.Controls.GridViewColumn.CreateCellEditElement(GridViewCell cell, Object dataItem) 
   at Telerik.Windows.Controls.GridView.GridViewCell.SetEditorContent(Object content) 
   at Telerik.Windows.Controls.GridView.GridViewCell.ShowEditor() 
   at Telerik.Windows.Controls.GridView.GridViewCell.<ToggleEditor>b__0() 
   at Telerik.Windows.Controls.GridView.GridViewCell.ModifyCellTemplate(Action executeAction) 
   at Telerik.Windows.Controls.GridView.GridViewCell.ToggleEditor() 
   at Telerik.Windows.Controls.GridView.EditContext.OnCellEditModeChanged(GridViewCell cell, Boolean newIsInEditMode) 
   at Telerik.Windows.Controls.GridView.GridViewCell.IsInEditModeChanged(DependencyObject target, 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, OperationType operationType) 
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) 
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 
   at Telerik.Windows.Controls.GridView.GridViewCell.set_IsInEditMode(Boolean value) 
   at Telerik.Windows.Controls.GridView.EditContext.SwitchCellToEditMode(GridViewCell cell) 
   at Telerik.Windows.Controls.GridView.EditContext.BeginEdit(GridViewCell gridViewCell) 
   at Telerik.Windows.Controls.GridView.EditContext.OnCellMouseUp(GridViewCell cell) 
   at Telerik.Windows.Controls.GridView.GridViewCell.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.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e) 
   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.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, Int32 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, 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 ***********.Shell.App.Main() in *****************************************************************\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() 

 (a bit long, sorry ... )

If I comment out the faulty line, the DataTemplate is instantiated correctly, and I can see my combo box in the RadGridView, but it is obviously closed, which is not fine for my case.
I also tried a similar, parallel case, where I replaced the RadComboBox with standard Windows WPF ComboBox, and I was surprised that I can use the ComboBox.IsDropDownOpenProperty without any problem, and the ComboBox that is built, is shown already opened just like I wanted it to be.

I would be happy to use a workaround also, to fix this.

Thanks a lot for your effort and do not hesitate to ask me any further information that may help you.

Kind Regards.

Max.
Valeri Hristov
Telerik team
 answered on 21 Oct 2009
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
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
SplashScreen
Rating
Accessibility
Callout
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?