Telerik Forums
UI for WPF Forum
1 answer
196 views
Hello,
I'm using dotnet 3.5, WPF.
XP pro SP3.
IE6.0.2900
RadControls_for_WPF_2009_1_0526_TRIAL
C#

I have created a simple RadGridView  with a GridViewComboBoxColumn column.
I have added a combobox "DataTemplate" so that the column cells will look like a combo, and not just
when pressing on one of the cells.

In the constructor of the window1, I call FillStatusComboColumn() to fill the combo with possible values.

*** The problem is that using the "DataTemplate" in the XAML causes the values in the
combobox to disappear. ***

Any ideas ?

Thanks

E. S

<telerik:RadGridView  Name="RadGridView1"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
AutoGenerateColumns="False"
ShowGroupPanel="False"
IsFilteringAllowed="False">
<telerik:RadGridView.Columns>
 <telerik:GridViewComboBoxColumn UniqueName="Status"
                                 HeaderText="STATUS">
 <telerik:GridViewColumn.CellTemplate>
   <DataTemplate>
      <ComboBox />
   </DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
 

private void FillStatusComboColumn()
{
var comboColumn = (Telerik.Windows.Controls.
GridViewComboBoxColumn)RadGridView1.Columns["Status"];
comboColumn.DataMemberBinding = new Binding("ActivityType");
comboColumn.ItemsSource = GetActivityTypes();
comboColumn.DisplayMemberPath =
"Name";
comboColumn.SelectedValueMemberPath =
"ID";
}

public class ActivityType
{
public string Name
{
get;
set;
}

public int ID
{
get;
set;
}

}

private System.Collections.IEnumerable GetActivityTypes()
{
List<ActivityType> ActivityTypes = new List<ActivityType>();

ActivityTypes.Add(new ActivityType() { ID = 0, Name = "" });
ActivityTypes.Add(new ActivityType() { ID = 1, Name = "Val1" });
ActivityTypes.Add(new ActivityType() { ID = 2, Name = "Val2" });
ActivityTypes.Add(new ActivityType() { ID = 3, Name = "Val3" });

return ActivityTypes;

}

Vlad
Telerik team
 answered on 10 Jun 2009
2 answers
220 views
Hi,

I've made a simple program with a RadCarousel in it.  The thing is, I would like to use my own Buttons (outside the carousel) to scroll through the RadCarousel instead of the carousel's default horizontal/vertical scrollbars.  Is there any way to tell the RadCarousel to scroll one way or the other from inside a Button's MouseLeftButtonDown event handler?  I've been trying to achieve this through RaiseSelectionChangedEvent (but can't seem to access the selected item's index) or ScrollViewer (but can't/don't know how to access the carousel's internal ScrollViewer).  I haven't worked a lot with scrolling in WPF before, so I may be missing something obvious.  Any light you could shed on this problem would be very much appreciated!

Thanks,

UIdev
UIdev
Top achievements
Rank 1
 answered on 10 Jun 2009
6 answers
1.2K+ views
I am working on my first WPF project and just started using RadControls for WPF so please forgive me if this is a stupid question :)

I have a RadTreeView with CheckBoxes (IsOptionElementsEnabled = "True" , ItemsOptionListType="CheckList")
In my code behind, I can see which items are checked or not using the "CheckedItems" property. Very nice.

However, how can I change the CheckBox status on individual items in my RadTreeView (check/uncheck) from code behind?
What is the best way to check/uncheck all checkboxes from code behind?

Kind regards,
Lars Bodin

 

 

 

Henrique Duarte
Top achievements
Rank 1
Veteran
 answered on 09 Jun 2009
1 answer
123 views
I'm using the WPF controls, and cannot find any documentation on RadMaskedTextBox.  The API reference has no comments.  How would one know what mask formats are supported?
Boyan
Telerik team
 answered on 09 Jun 2009
19 answers
383 views
Hi,


I have a RadTreeView bound to my datasource and everything is working fine, however, I am having trouble when adding a new object to the underlying databound  collection, your documentation does not seem to cover this scenario in depth. What I would like to achieve is this:-

Each time the user right clicks on a treeviewitem a dynamic context menu is built and displayed. (it has to be a dynamic context menu because each node represents a particular business event)

On selection of a menu item , a new node is added to the tree , brought into focus and in edit mode.

I require a reference to the treeviewitem each time the user selects a node (I am a bit confused why the SelectionChanged event does not pass me back a reference to the treeviewitem)

    <DockPanel x:Name="dp" LastChildFill="True" > 
        <DockPanel.Resources> 
           <ContextMenu x:Key="contextMenu">  
            </ContextMenu> 
            <Style TargetType="telerik:RadTreeViewItem" x:Key="itemStyle">  
                <Setter Property="ContextMenuService.ContextMenu" Value="{StaticResource contextMenu}" /> 
            </Style> 
            <CollectionViewSource x:Key="cvs" /> 
              
            <LocalF:GetHBaseListConverter x:Key="GetHBaseListConverter"/>  
 
            <HierarchicalDataTemplate  DataType="{x:Type LocalModel:BaseListHierarchy}" ItemsSource="{Binding Converter={StaticResource GetHBaseListConverter}}">  
                <StackPanel Name="Node" Orientation="Horizontal">  
              
                    <Image Name="imgIcon" Width="20" Height="20" Stretch="Fill" /> 
                    <TextBlock Name="txtNode"   Text="{Binding Name}"  Margin="5,0,0,0" MouseDown="txtNode_MouseDown" /> 
 
                
                </StackPanel> 
                <HierarchicalDataTemplate.Triggers> 
                     
                   <DataTrigger Binding="{Binding IsFolder}" Value="True">  
                            <Setter TargetName="imgIcon" Property="Image.Source" Value="../../Images/folder.png" /> 
                    </DataTrigger> 
                    <DataTrigger Binding="{Binding IsFolder}" Value="False">  
                        <Setter TargetName="imgIcon" Property="Image.Source" Value="../../Images/diskdrive.png" /> 
                    </DataTrigger> 
                    
                </HierarchicalDataTemplate.Triggers> 
            </HierarchicalDataTemplate> 
             
                 
        </DockPanel.Resources> 
          
        <telerik:RadTreeView ItemsSource="{Binding}"   IsDragDropEnabled="True"  Edited="trvListEvents_Edited"    DataContext="{Binding Source={StaticResource cvs }}"   Name="trvListEvents"  Selected="trvListEvents_Selected"    > 
              
        </telerik:RadTreeView> 
             
    </DockPanel> 

Thanks

P
Paul Gallen
Top achievements
Rank 1
 answered on 09 Jun 2009
1 answer
60 views
Hi

Is there any reason why the edited event fires twice after editing the radTreeViewItem


Best

P
Bobi
Telerik team
 answered on 09 Jun 2009
2 answers
56 views
Hi

I've installed Rad Controls for WPF "RadControls_for_WPF_2009_1_0526_TRIAL".But when i tried to add the RadGridView control to the project its giving error.Below i've pasted the error message shown in deign window.

Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.get_HeightsCache() in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 73
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.get_ExtentHeight() in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 505
   at Telerik.Windows.Controls.GridView.GridViewScrollViewer.UpdateScrollBars() in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewScrollViewer.cs:line 493
   at Telerik.Windows.Controls.GridView.GridViewScrollViewer.GridViewScrollViewer_LayoutUpdated(Object sender, EventArgs e) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewScrollViewer.cs:line 513
   at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   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.RenderMessageHandler(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)


Is there anything wrong happened while installing the package ?

With Regards,
Madhu k


Madhu
Top achievements
Rank 1
 answered on 09 Jun 2009
1 answer
62 views
Hi

i've tried to add RADGridView control to the window of wpf project.but its giving error like

Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.get_HeightsCache() in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 73
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.get_ExtentHeight() in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 505
   at Telerik.Windows.Controls.GridView.GridViewScrollViewer.UpdateScrollBars() in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewScrollViewer.cs:line 493
   at Telerik.Windows.Controls.GridView.GridViewScrollViewer.GridViewScrollViewer_LayoutUpdated(Object sender, EventArgs e) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q1_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewScrollViewer.cs:line 513
   at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   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.RenderMessageHandler(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)

Hav i missed any dll's while installing RAD controls ?
I've installed trail version of RAD controls.

With Regards,
Madhu k







Vlad
Telerik team
 answered on 09 Jun 2009
1 answer
168 views
Hi,

I currently have 2 issues on the width of a column.

1) if you change the size of the 1st column by dragging the separator and 'hide' the column, you can't get it back. All the other columns can be restored, but the 1st isn't restorable. This only happens when the user can't freeze columns.


2) It seems like the auto-size functionality of the columns only works 1 time. Normally if you resize a column and double-click on the separator, the column will auto-size to the right size. Currently, this doesn't appear to work, with any of the ColumnsWidthMode values.
Kalin Milanov
Telerik team
 answered on 09 Jun 2009
5 answers
141 views
Hi ,

Few minutes back i've installed RAD controls for WPF.When i tried to acces the quick starts i'm getting error.
Even i couldnt able to access the online version of Quick starts ...its showing error message in browser which something goes like this.

Startup URI: http://demos.telerik.com/wpf/
Application Identity: http://demos.telerik.com/wpf/#Telerik.Windows.Examples.xbap, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=06e954e71cc7b2f5, processorArchitecture=msil/Telerik.Windows.Examples.exe, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=06e954e71cc7b2f5, processorArchitecture=msil, type=win32

This application type has been disabled.

-----------------------

PresentationHost.exe v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\system32\PresentationHost.exe
ntdll.dll v5.1.2600.5755 (xpsp_sp3_gdr.090206-1234) - C:\WINDOWS\system32\ntdll.dll
kernel32.dll v5.1.2600.5781 (xpsp_sp3_gdr.090321-1317) - C:\WINDOWS\system32\kernel32.dll
ADVAPI32.dll v5.1.2600.5755 (xpsp_sp3_gdr.090206-1234) - C:\WINDOWS\system32\ADVAPI32.dll
RPCRT4.dll v5.1.2600.5512 (xpsp.080413-2108) - C:\WINDOWS\system32\RPCRT4.dll
Secur32.dll v5.1.2600.5753 (xpsp_sp3_gdr.090203-1302) - C:\WINDOWS\system32\Secur32.dll
USER32.dll v5.1.2600.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\USER32.dll
GDI32.dll v5.1.2600.5698 (xpsp_sp3_gdr.081022-1932) - C:\WINDOWS\system32\GDI32.dll
msvcrt.dll v7.0.2600.5512 (xpsp.080413-2111) - C:\WINDOWS\system32\msvcrt.dll
ole32.dll v5.1.2600.5512 (xpsp.080413-2108) - C:\WINDOWS\system32\ole32.dll
SHELL32.dll v6.00.2900.5622 (xpsp_sp3_gdr.080617-1319) - C:\WINDOWS\system32\SHELL32.dll
SHLWAPI.dll v6.00.2900.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\SHLWAPI.dll
urlmon.dll v7.00.6000.16825 (vista_gdr.090218-1505) - C:\WINDOWS\system32\urlmon.dll
OLEAUT32.dll v5.1.2600.5512 - C:\WINDOWS\system32\OLEAUT32.dll
iertutil.dll v7.00.6000.16825 (vista_gdr.090218-1505) - C:\WINDOWS\system32\iertutil.dll
mscoree.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\system32\mscoree.dll
WININET.dll v7.00.6000.16827 (vista_gdr.090226-1506) - C:\WINDOWS\system32\WININET.dll
Normaliz.dll v6.0.5441.0 (winmain(wmbla).060628-1735) - C:\WINDOWS\system32\Normaliz.dll
IMM32.DLL v5.1.2600.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\IMM32.DLL
comctl32.dll v6.0 (xpsp.080413-2105) - C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
uxtheme.dll v6.00.2900.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\uxtheme.dll
MSCTF.dll v5.1.2600.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\MSCTF.dll
CLBCATQ.DLL v2001.12.4414.700 - C:\WINDOWS\system32\CLBCATQ.DLL
COMRes.dll v2001.12.4414.700 - C:\WINDOWS\system32\COMRes.dll
VERSION.dll v5.1.2600.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\VERSION.dll
xpsp2res.dll v5.1.2600.5512 (xpsp.080413-2113) - C:\WINDOWS\system32\xpsp2res.dll
ws2_32.dll v5.1.2600.5512 (xpsp.080413-0852) - C:\WINDOWS\system32\ws2_32.dll
WS2HELP.dll v5.1.2600.5512 (xpsp.080413-0852) - C:\WINDOWS\system32\WS2HELP.dll
nvLsp.dll v2, 2, 0, 6793 - C:\WINDOWS\system32\nvLsp.dll
PSAPI.DLL v5.1.2600.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\PSAPI.DLL
mswsock.dll v5.1.2600.5625 (xpsp_sp3_gdr.080620-1249) - C:\WINDOWS\system32\mswsock.dll
hnetcfg.dll v5.1.2600.5512 (xpsp.080413-0852) - C:\WINDOWS\system32\hnetcfg.dll
wshtcpip.dll v5.1.2600.5512 (xpsp.080413-0852) - C:\WINDOWS\System32\wshtcpip.dll
dfshim.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\system32\dfshim.dll
MSVCR80.dll v8.00.50727.1433 - C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\MSVCR80.dll
mscorwks.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
PresentationHostDLL.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\Microsoft.Net\Framework\v3.0\WPF\PresentationHostDLL.dll
mscorlib.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\32e6f703c114f3a971cbe706586e3655\mscorlib.ni.dll
System.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\ba0e3a22211ba7343e0116b051f2965a\System.ni.dll
WindowsBase.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\WindowsBase\0703021437c2ec71213a6b701771be86\WindowsBase.ni.dll
PresentationCore.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationCore\011f8e31d197b4ccb6a61c2267a38e5c\PresentationCore.ni.dll
PresentationFramework.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\60421dda88800b14dc101ed9dca422fe\PresentationFramework.ni.dll
msctfime.ime v5.1.2600.5512 (xpsp.080413-2105) - C:\WINDOWS\system32\msctfime.ime
actxprxy.dll v6.00.2900.5512 (xpsp.080413-2113) - C:\WINDOWS\system32\actxprxy.dll
PresentationHostProxy.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\system32\PresentationHostProxy.dll


Whats the reason for this ..how can i access the quick starts ?

With Regards,
Madhu k

Vlad
Telerik team
 answered on 09 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?