Telerik Forums
UI for WPF Forum
3 answers
83 views
When I look at all of the WPF examples I see the XAML pages, but when i click to see C# pages nothing happens... Both in
IE 8.0.6001.18828
and
Firefox
3.0.8

Thanks !
Milan
Telerik team
 answered on 03 Nov 2009
9 answers
212 views
Hi,

Is there any way to bind to the CheckState of an Item in the TreeView?

Cheers

Justin Taylor
Tihomir Petkov
Telerik team
 answered on 02 Nov 2009
1 answer
268 views
is there a way to remove the scroll bars on a combox dropdown.  I just want the dropdown to be large enough for all the items.  I only have 1 or 2 too many items, and would rather have a larger dropdown then have scroll bars
Valeri Hristov
Telerik team
 answered on 02 Nov 2009
3 answers
259 views
Hi,

I would like to do some basic customizations to the Telerik GridView. I am using the Office_Silver theme  

1. Remove all gridlines from the Telerik GridView - including the column headers

2. Set the highlight color for the row

3. Customize the alternating background color
          Already done using the AlternateRowStyle property on RadGridView

Can someone please advise me how I can make these customizations

Thanks
Namir


            
Kalin Milanov
Telerik team
 answered on 02 Nov 2009
5 answers
226 views
Hi.
I have TreeView like:
A
  AA
  AA
B
  BB
  BB
C
  CC
  ...
Drag/drop is only allowed inside of its group. Ex: AA can be moved anywhere inside A group, BB can be moved anywhere inside B group. Initialy i was stopping drop using previewDragEnded. It worked only in situations when drop position was "inside". If drop position was "after" or "before" RadTreeViewDragEndedEventArgs e.TargetDropItem was always null even though if I check TreeView.TargetDropItem was set correctly (I guess it is a bug? ). I couldnt check it cause TreeView.TargetDropItem is not accesible from code.
My current approach is traverse the tree and set IsDropAllowed property on every item. The problem here are elements whose drop position is "after" or "before" which I try to drop after or before root elements (A, B, C). These root elements doesn't have parent elemnent so I don't see any way to set there IsDropAllowed . So behaviour I have now is: after I drag AA after B I got:
B
   BB
   BB
   AA
I thought about adding additional root element and add current root elements to him but in this case I would have to hide (don't display) the new root element otherwise I would have the same problem as before.

Any help or suggestions would be appreciated.

Best Regards,
Jarek (Xiasma)


Bobi
Telerik team
 answered on 30 Oct 2009
2 answers
434 views
I am trying to wire-up a click event to a checkbox column inside the RadGridview.  My problem is that when I handle the click event of the check box the grid has not registered the selected item yet, so I can't access the record to obtain the value from another column for the record which was checked.  Here is the click event code:

        private void CheckBox_Click(object sender, RoutedEventArgs e)  
        {  
            CheckBox chkbox = (CheckBox)sender;  
            ApplyPaymentEntity payment = new ApplyPaymentEntity();  
            payment = (ApplyPaymentEntity)this.grdPmtDetail.SelectedItem;  
 
            if (chkbox.IsChecked == true)  
            {  
                AppliedAmount = AppliedAmount + (decimal)payment.BillBalance;  
            }  
            else  
            {  
                AppliedAmount = AppliedAmount - (decimal)payment.BillBalance;  
            }  
  
        }  

The SelectedItem property is null.  So I need to handle the click event after the grid has processed the click.  Just not quite sure yet how to do this.

Thanks,
-SId.
Sid
Top achievements
Rank 1
 answered on 30 Oct 2009
1 answer
91 views
I have discovered a GridViewComboBoxColumn, NullReferenceException that is reproducible with the Examples_WPF application. Using the GridView Editors example, if you drop down the country combo box, then select another row and try to drop down the country list, a NullReferenceException is thrown. The exception is thrown even if you try to drop down the list in the same row that you started with. I am trying to use the GridViewComboBoxColumn in my app in a similar way that the example shows and am having the same problem. I am using the latest internal build (2009.2.1023.35). The Telerik.com online demo does the same thing.

Thanks,
Kevin
Pavel Pavlov
Telerik team
 answered on 30 Oct 2009
1 answer
112 views
I have RadTabcontrol and whenever user click on New button I want to add new tab containing usercontrol everytime.I have successfully achieved this at run time but due to some Performance issue I want to achieve this in xaml
I tried:
 <Setter Property="telerikNavigation:RadTabControl.ItemContainerStyle">
                                        <Setter.Value>
                                            <Style TargetType="telerikNavigation:RadTabItem">
                                                <Setter Property="Foreground" Value="Black"/>
                                                <Setter Property="FontFamily" Value="Tahoma"/>
                                                <Setter Property="BorderThickness" Value="0"/>
                                                <Setter Property="BorderBrush" Value="Transparent"/>
                                                <!--<Setter Property="Content" >
                                                    <Setter.Value>
                                                        <ctrl:ctrlReview  x:Name="Uctrl" REVKEY="{Binding Source={StaticResource RevKeyProvider}}">
                                                        </ctrl:ctrlReview>
                                                    </Setter.Value>
                                                 </Setter>-->


while setting value for property content,It giving me error:Cannot add content of type 'SafetyAuditUserControl.ctrlReview' to an object of type 'System.Object'.

Please help

Bobi
Telerik team
 answered on 30 Oct 2009
1 answer
128 views
Hi ,im facing strange problem  , project compiles successfully,app works fine to, but designer window shows error , i dunno whats the "type: Customer" it doesnt exits in my project
thanks
itemsource provider is EntityFramework
<telerik:RadGridView.Columns>
              
  <telerik:GridViewDataColumn Header="Cost" DataMemberBinding="{Binding Cost}"  DataType="{x:Type System:Double}" >
                    <grid:GridViewDataColumn.AggregateFunctions>
                        <data:SumFunction Caption="Sumا "  SourceField="Cost" />
                    </grid:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>

</telerik:RadGridView.Columns>



Error:
Invalid property or field - 'Cost' for type: Customer
   at Telerik.Windows.Data.Expressions.MemberAccessTokenExtensions.CreateMemberAccessExpression(IMemberAccessToken token, Expression instance) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\MemberAccess\Tokenizer\MemberAccessTokenExtensions.cs:line 21
   at Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\ExpressionFactory.cs:line 32
   at Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName, Boolean liftMemberAccessToNull) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\ExpressionFactory.cs:line 42
   at Telerik.Windows.Data.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\MemberAccess\PropertyAccessExpressionBuilder.cs:line 15
   at Telerik.Windows.Data.Expressions.EnumerableSelectorAggregateFunctionExpressionBuilder.CreateMemberSelectorExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\Aggregates\EnumerableSelectorAggregateFunctionExpressionBuilder.cs:line 37
   at Telerik.Windows.Data.Expressions.EnumerableSelectorAggregateFunctionExpressionBuilder.CreateAggregateExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\Aggregates\EnumerableSelectorAggregateFunctionExpressionBuilder.cs:line 28
   at Telerik.Windows.Data.EnumerableSelectorAggregateFunction.CreateAggregateExpression(Expression enumerableExpression) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Data\Grouping\Aggregates\EnumerableSelectorAggregateFunction.cs:line 22
   at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.<ProjectionPropertyValueExpressions>b__3(AggregateFunction f) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 212
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionInitExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 203
   at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateAggregateFunctionsProjectionMemberBinding() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 195
   at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.<CreateMemberBindings>d__0.MoveNext() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 113
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Linq.Expressions.ReadOnlyCollectionExtensions.ToReadOnlyCollection[T](IEnumerable`1 sequence)
   at System.Linq.Expressions.Expression.MemberInit(NewExpression newExpression, IEnumerable`1 bindings)
   at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateSelectBodyExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 105
   at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateSelectExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 97
   at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilderBase.cs:line 30
   at Telerik.Windows.Data.QueryableExtensions.Aggregate(IQueryable source, IEnumerable`1 aggregateFunctions) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Collections\QueryableExtensions.cs:line 92
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CalculateAggregates() in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3066
   at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass3c.<Bind>b__3b() in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3345
   at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Controls\CursorManager.cs:line 16
   at Telerik.Windows.Controls.GridView.GridViewDataControl.Bind(Object newValue) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3271
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 2946
   at Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\DataControl.cs:line 361
   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.DataControl.set_ItemsSource(Object value) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\DataControl.cs:line 149
   at Telerik.Windows.Controls.RadGridView.OnApplyTemplate() in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\RadGridView.cs:line 226
   at System.Windows.FrameworkElement.ApplyTemplate()
   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 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.Designer.SimpleViewManager.DesignerBackground.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 Microsoft.Windows.Design.Interaction.DesignerView.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Designer.Viewport.MeasureOverride(Size availableSize)
   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.ScrollContentPresenter.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.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 System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder.Initialize()
   at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder..ctor(UIElement content)
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.get_ViewHandle()
   at MS.Internal.Host.Isolation.IsolatedView.get_ViewHandle()
   at MS.Internal.Designer.DesignerPane.LoadDesignerView()
Stefan Dobrev
Telerik team
 answered on 30 Oct 2009
1 answer
79 views
Hi all,

I want to interface the Telerik RadGridView control with some data on my SQL Server backend. At the moment I am deciding the best method to do this, what I want to do on the grid is to have regions where user input is allowed (editable) and regions where it is only read only. Users will need to be able to change the editable values (which are pulled from the database) and these changes will need to be updated into the database, then used to recalculated (on the client end) and then reflected in the read only regions of the grid.

At the moment I've written functionality to get data from the database (LINQ TO SQL) and then individually create rows which are inserted into a data table which is then bound to the RAD datagrid. Will I be able to control the properties of each row this way? For example having some rows editable, some read only and also styling options such as cell back ground colour, font bolding etc.

I apologise if my description is very vague but it's the best way I can explain it at the moment!

Thanks in advance!

Tim.
Stefan Dobrev
Telerik team
 answered on 30 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?