Telerik Forums
UI for WPF Forum
2 answers
184 views
I have a grid that I have set the IsReadOnly to true.  When I am in the grid on any cell, if I press the Enter key, I get the following error.

Unable to cast object of type 'System.Windows.Input.KeyEventArgs' to type 'FullyLoadedCostLibrary.BareDriveCosts'.


StackTrace:
   at Telerik.Windows.Data.FuncExtensions.<>c__DisplayClass1`2.<ToUntypedFunc>b__0(Object item) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Core\Data\Extensions\FuncExtensions.cs:line 24
   at Telerik.Windows.Data.FunctionComparer.Compare(Object x, Object y) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Core\Data\FunctionComparer.cs:line 34
   at System.Collections.Generic.ArraySortHelper`1.InternalBinarySearch(T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.BinarySearch(T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)

I'm using version 2011.2.712.40 WPF

My grid is defined
        <telerik1:RadGridView Name="bareDriveCostsListRadGridView"
               DataContext="{StaticResource bareDriveCostsListViewModelModelViewSource}" 
			   ItemsSource="{Binding ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}" AutoGenerateColumns="False" CanUserDeleteRows="False"
               AutoExpandGroups="True" DataLoaded="bareDriveCostsListRadGridView_DataLoaded" SelectionUnit="Cell"
               IsReadOnly="{Binding Source={StaticResource bareDriveCostsListViewModelViewSource}, Path=CanEdit, Converter={StaticResource NotConverter}}">


I have some columns defined like this
<telerik1:GridViewMaskedTextBoxColumn Name="HistoryColumn4" DataFormatString="{}{0:n}"  MaskType="Numeric" Mask="n"  Header="{Binding Path=HistoryName4}" Background="LightGray" DataMemberBinding="{Binding Path=History4.Cost}" IsReadOnly="True" TextAlignment="Right"  IsFilterable="False" IsSortable="False" />
and some like this
                <telerik1:GridViewMaskedTextBoxColumn Name="BareDriveCostColumn" Header="Bare Drive Cost" DataMemberBinding="{Binding Path=Cost}" DataFormatString="{}{0:n}" TextAlignment="Right" MaskType="Numeric" Mask="n"  IsFilterable="False" IsSortable="False" >
                    <telerik1:GridViewMaskedTextBoxColumn.CellTemplate>
                        <DataTemplate>
                            <Grid MouseRightButtonDown="Cell_MouseRightButtonDown" DataContext="{Binding}"
                                  ToolTip="{DynamicResource toolTipTemplate}">
                                <TextBlock Text="{Binding Cost}"/>
                                <Border VerticalAlignment="Top" Width="5" Height="5" HorizontalAlignment="Right" Background="Red" Visibility="{Binding Comments,Converter={StaticResource MyConverter}}"/>
                            </Grid>
                        </DataTemplate>
                    </telerik1:GridViewMaskedTextBoxColumn.CellTemplate>                                    
                </telerik1:GridViewMaskedTextBoxColumn>
it errors on any of them.


David Brenchley
Top achievements
Rank 1
 answered on 26 Aug 2011
1 answer
181 views
All,

I have a calculated column in my grid. It works pretty fine but once I change one of the correspondig fields (Qt1...Qty18) the Total column doesn't update automatically. Is it supposed to calculate only once upon loading the grid or can I somehow accomplish to calculate on the fly once a depended column changes?

Thanks,
Lars

...
<telerik:GridViewExpressionColumn
                        Header="Total"
                        UniqueName="Total"
                        DataFormatString="{}{0:#,##0}"
                        />
...

In the constructor of the code behind I have the following lines:

    Expression<Func<ForecastInputItemViewModel, double>> expression = prod => prod.Qty1 + prod.Qty2 + prod.Qty3 + prod.Qty4 + prod.Qty5 + prod.Qty6 + prod.Qty7 + prod.Qty8 + prod.Qty9 + prod.Qty10 + prod.Qty11 + prod.Qty12 + prod.Qty13 + prod.Qty14 + prod.Qty15 + prod.Qty16 + prod.Qty17 + prod.Qty18;
            GridViewExpressionColumn column = ForecastGrid.Columns["Total"] as GridViewExpressionColumn;
            column.Expression = expression;
Dimitrina
Telerik team
 answered on 26 Aug 2011
1 answer
78 views
Hi Support

I have problem with RadDock when I change Flowdirection to RightToLeft, it doesn't work correctly while Drag and drop. any idea how to fix it? (I Use 2011.Q2 version)

All the best
Mehri

P.S. here is my xaml Code:

<telerik:RadDocking FlowDirection="RightToLeft" >
            <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="200,600"  InitialPosition="DockedTop">
                <telerik:RadPaneGroup TabStripPlacement="Top"  >
                            <telerik:RadPane Header="Pane 1"  />
                            <telerik:RadPane Header="Pane 2" />
                </telerik:RadPaneGroup>

            </telerik:RadSplitContainer>
 </telerik:RadDocking>


Boyan
Telerik team
 answered on 26 Aug 2011
1 answer
291 views
Hi,
a have a RadGridView with a bound ObservableCollection datacontext.
When the user selects a row and pushes the Delete key, the row disappears and the Deleted event is fired.
I have a menu item as well which allows to delete the selected row programmatically,
but when I call mygrid.Items.Remove(myselectedrow.DataContext) the row disappears, but the Deleted event is not triggered.
How can I get the grid to fire the Deleted event when removing a  row programmatically as well?

Is it something like
mygrid.RaiseEvent(new RoutedEventArgs(RadGridViewEvents.DeleteRow, my_row));
?
Thank you,
Bye
Maya
Telerik team
 answered on 26 Aug 2011
3 answers
95 views
Hello everyone,

I am very new to this and I have just started using WPF. I am writing a application that I need a right side bar to have different options to select. I was using the TopRightPanel that I found in some of your examples and I can't get the side panel to display in the window. Any ideas anyone this would help a lot thank you.
Evgenia
Telerik team
 answered on 26 Aug 2011
3 answers
122 views
hello,I am learning WPF programming and find out which WPF products will be better,I have tested Dev's,ActiproSoftware for WPF,DotNetBar for WPF and yours,I think that your product is better than others.I am build a demo application to test the perfermance and the functions we need,then meet a problem,I have no idea that to show a table data in the treelistview control,as you know,In winform applications,if we want to build a treelist view,just only to set properties named ParentFieldId and KeyFieldId,but with WPF application,it is not so easy!
Could you help me to build the treelistview to show the data which screenshot is attached!
Any help will be appreciated!

Sorry for my bad English.


Maya
Telerik team
 answered on 26 Aug 2011
1 answer
89 views
We have been using the GridView for a while now and we use Aggregation functions to let it calculate the totals. This works all fine.

The nice thing we can use grouping by default and get a total aggregation line as well Now here is the problems
The values on this line are not lined out with the original cells. Everything is lined to the left and looks very messy
Is there a solution to let these aggregation values be in the same column on these lines?
Maya
Telerik team
 answered on 26 Aug 2011
3 answers
249 views
Hi, I am trying to use create dynamically Panes in RadDocking using PaneGroupExtensions class using MVVM pattern. It is working fine with my item source. However my requirements is slightly change that if any Pane is visible already then it should not add a new tab again, instead just highlight (select) previously added Pane.
For this I am holding a Dictionary that which Pane is visible but I can't find any way that when user close Pane from RadDocking then how can I capture this event so that I can remove the object from my dictionary.

Many Thanks,
Konstantina
Telerik team
 answered on 26 Aug 2011
1 answer
62 views
Hi Guys,

I'd like to know how to show up a context menu on a RadButton, and then the data then will be filtered/grouped/sorted from the RadGrid.

Here is the context menu that I wanted to have on a RadButton when it is clicked: http://www2.picturepush.com/photo/a/6379460/img/6379460.png


Thanks
Dimitrina
Telerik team
 answered on 25 Aug 2011
11 answers
370 views
How can I build a best Pie Chart to retrieve my database data?

Thanks in advance
Evgenia
Telerik team
 answered on 25 Aug 2011
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?