Telerik Forums
UI for WPF Forum
1 answer
54 views
I've spotted a few omissions in the documentation, mainly in the 'What's New' areas, so I just thought I'd point them out. Overall, the documentation is much improved - many thanks for that.

  • Overall 'What's New' is still for Q2.
  • RadGauge 'changes and backwards compatibility' still for Q2
  • RadScheduler ditto
  • RadGauge ditto
  • RadTreeView 'changes' section is empty
  • RadTabControl 'changes' section is empty
  • Some controls don't have a 'what's new' or 'changes' section
  • Some controls are missing from the 'Controls' section altogether - e.g. RadButton,RadMenu,RadDatePicker

Steve
Hristo
Telerik team
 answered on 05 Nov 2009
2 answers
73 views
Getting fatal error when I attempt to run the WPF Examples executable. Here is the message:
"Telerik.Windows.Examples has encountered a problem and needs to close...."

Dialog appears to send error report to Microsoft.

Any ideas about how I can correct the problem?
Milan
Telerik team
 answered on 05 Nov 2009
4 answers
121 views
HI,
I'm getting an application error whenever I'm doing a mouse wheel scrolling on an empty grid.
Some details:

===================================

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index (mscorlib)

------------------------------
Program Location:

   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.LineUp()
   at Telerik.Windows.Controls.GridView.GridViewScrollViewer.OnMouseWheel(MouseWheelEventArgs e)
   at System.Windows.UIElement.OnMouseWheelThunk(Object sender, MouseWheelEventArgs e)
   at System.Windows.Input.MouseWheelEventArgs.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)

Binu Abraham
Top achievements
Rank 1
 answered on 04 Nov 2009
3 answers
57 views
Hi,

I tried to show mm/yyyy on gridview with the code

CultureInfo

 

cultureInfo = new CultureInfo("en-US");

 

 

DateTimeFormatInfo dateInfo = new DateTimeFormatInfo();

 

dateInfo.ShortDatePattern =

"MM/yyyy";

 

cultureInfo.DateTimeFormat = dateInfo;

 

Style datePickerStyle = new Style(typeof(RadDatePicker));

 

datePickerStyle.Setters.Add(

new Setter(RadDatePicker.CultureProperty, cultureInfo));

 

datePickerEditorSettings.CellEditStyle = datePickerStyle;

 

 

 

((

GridViewDataColumn)this.radGridViewData.Columns[1]).EditorSettings = datePickerEditorSettings;

It crashes, but if I change MM/yyyy to MM/dd/yyyy, the cells shows MM/dd/yyyy 12:00 AM.

Thanks so much for any help.

 

Stefan Dobrev
Telerik team
 answered on 04 Nov 2009
1 answer
92 views

Ok… I want to play with the Q3 beta because it has fixes for significant bugs in Q2 and support suggested I do so. So, I uninstall Q2 and put in Q3. Immediately, my project breaks because the namespaces and references have been altered. I have some comments and maybe you guys can supply some help.

  • Is there a simple, clear document discussing how to upgrade a project from Q2 to Q3? Actually, I had really hoped given the price there would be a tool - alas, it is not to be :)
  • The beta documentation lacks any discussion of how to install the controls to the toolbox. While it looks like the installer mad a valiant attempt to do so the toolbox is still littered with icons we don't need there and it is really cluttered. As a bonus point, the controls were added to the 2010 toolbox, but with similar problems.
  • While we can drag / drop many controls from the toolbox onto the design surface but the RadGrid isn't one of them. For some reason what I am sure is one of the most used controls of the bunch is the one thats broken :)
  • Trying to fill in the holes from the demo source code isn't much help as it looks like the DLL names and namespaces have changed.
  • The demo source code included does not build, at least not in VS2008 under Win7 x64

So here are my hopes...

  • That someone has a clear, concise guide on what references and so on need to change for goign Q2 -> Q3
  • Some source code using the CURRENTLY shipping beta that actually builds and has a grid on it
  • Word that the documentation and toolbox issues will be resovled before this ships

 

Thanks! I really love these controls and I just keep asking for more, I know :)

Ken

Hristo
Telerik team
 answered on 04 Nov 2009
2 answers
88 views
Hi,

For ListView, I can display an image (check mark) inside a checkbox control. For Telerik Grid, how to do this?

Thanks,
sum sum
Top achievements
Rank 1
 answered on 04 Nov 2009
3 answers
233 views
I have IList<Vehicle_Data> where
Vehicle_Data has property:      keyvehicletype,owned,VEHICLE_TYPES
where VEHICLE_TYPES has property:   keyvehicletype,DESCRIPTION,POWER_UNIT,TOTAL

there is mapping between vehicle_data,vehicle_types.

Grid doesn't allow me to multiselect rows.please reply ASAP

    <telerik:RadGridView  MultipleSelect="True"   LostFocus="RadGridView1_LostFocus"   Name="RadGridView1"  Height="150"   ScrollViewer.HorizontalScrollBarVisibility="Hidden"   ScrollViewer.VerticalScrollBarVisibility="Auto"   VerticalAlignment="Stretch"  ShowGroupPanel="False" ShowGroupFooters="False"   ColumnsWidthMode="Fill" ShowColumnFooters="True"  HorizontalAlignment="Stretch" IsFilteringAllowed="False"   RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"  telerik:StyleManager.Theme="Office_Black" CanUserFreezeColumns="False" AreRowDetailsFrozen="False"  CellEditEnded="RadGridView1_CellEditEnded"     >
                          
                            <telerik:RadGridView.Resources>
                                <Style TargetType ="{x:Type telerik:GridViewHeaderCell}">
                                    <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/>
                                </Style>
                                <Style TargetType="telerik:GridViewCell">
                                    <EventSetter Event="MouseUp" Handler="Cell_MouseUP"/>
                                    
                                </Style></<telerik:RadGridView.Resources>

                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn x:Name="dcVehicletype" Header="Vehicle Type" ToolTip="Vehicle Type" IsReadOnly="True" HeaderTextAlignment="Center" TextWrapping="Wrap"   DataMemberBinding="{Binding Path=VEHICLE_TYPES.DESCRIPTION}"     />

                                <telerik:GridViewDataColumn Header="Power Unit" ToolTip="Power Unit" IsReadOnly="True" HeaderTextAlignment="Center"  >
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=VEHICLE_TYPES.POWER_UNIT,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Passenger Unit" ToolTip="Passenger Unit" IsReadOnly="True" HeaderTextAlignment="Center">
                                    <telerik:GridViewColumn.CellTemplate >
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=VEHICLE_TYPES.PASSENGER_UNIT,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="HM Capable" HeaderTextAlignment="Center" IsReadOnly="True" ToolTip="HM Capable">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsEnabled="False" HorizontalAlignment="Center" VerticalAlignment="Center"  IsChecked="{Binding Path=VEHICLE_TYPES.HM_CAPABLE,Converter={StaticResource BoolConverter}}" ></CheckBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Total"   TextAlignment="Center"  IsReadOnly="True" IsEnabled="False"   DataMemberBinding="{Binding x:null}"  HeaderTextAlignment="Center" >
                                    <telerik:GridViewColumn.CellTemplate  >
                                        <DataTemplate>
                                            <TextBlock Foreground="Gray" IsEnabled="False"  HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding VEHICLE_TYPES.TOTAL}" >
                                            </TextBlock>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>


                                <telerik:GridViewDataColumn   Header="Owned" TextAlignment="Center"  ToolTip="Owned" IsReadOnly="True"   HeaderTextAlignment="Center" DataMemberBinding="{Binding x:null}"  >
                                  
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii"  Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center" Tag="{Binding}"  VerticalAlignment="Top" Width="40" TextChanged="TxtOwned_TextChanged"   x:Name="TxtOwned" Margin="5,0" Text="{Binding OWNED}" >
                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>

                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Owned: "  SourceField="OWNED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>

                                <telerik:GridViewDataColumn Header="Term Leased"   ToolTip="Term Leased" HeaderTextAlignment="Center" DataMemberBinding="{Binding x:null}" IsReadOnly="True"  >
                                   
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii" Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center"  Tag="{Binding}"  VerticalAlignment="Top" Width="40"  TextChanged="TxtTermLeased_TextChanged"   x:Name="TxtTermLeased" Margin="5,0" Text="{Binding TERM_LEASED}" >

                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Term Leased: "  SourceField="TERM_LEASED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn  Header="Trip Leased" TextAlignment="Center" ToolTip="Trip Leased" HeaderTextAlignment="Center"  DataMemberBinding="{Binding x:null}" IsReadOnly="True"  >
                                  
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <ctrlMaskedTxt:MaskedTextBox InputMask="iii" Style="{StaticResource TxtBackground}" FontWeight="Bold" HorizontalAlignment="Center" Tag="{Binding}"  VerticalAlignment="Top" Width="40" TextChanged="TxtTripLeased_TextChanged"   x:Name="TxtTripLeased"  Margin="5,0" Text="{Binding TRIP_LEASED}" >
                                            </ctrlMaskedTxt:MaskedTextBox>
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Trip Leased: "  SourceField="TRIP_LEASED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
private void Cell_MouseUP(object sender, MouseEventArgs args)
        {
            try
            {
          
                foreach (DataRecord rec in this.RadGridView1.Records)
                {
                   // DriverVehicle_Data d = (DriverVehicle_Data)rec.Data;
                    //d.TOTAL = Convert.ToInt32(d.OWNED + d.TERM_LEASED + d.TRIP_LEASED);
                     VEHICLE_DATA r = (VEHICLE_DATA)rec.Data;
                     VEHICLE_TYPES type = (VEHICLE_TYPES)r.VEHICLE_TYPES;
                     type.TOTAL = Convert.ToInt32(r.OWNED + r.TERM_LEASED + r.TRIP_LEASED);
                }

                RadGridView1.CalculateAggregates();
                RadGridView1.CommitEdit();
                RadGridView1.MultipleSelect = true;
            }
            catch (Exception ex)
            {
                throw;
            }

        }

 
Milan
Telerik team
 answered on 04 Nov 2009
1 answer
123 views
I am using RadTabControl and theme=officeblack,I have noticed that it show a panel colored with  black color background with rounded border corner to left and right tabs .Is there some way that I can change the background color of tabcontrol (black) to something else.
I would also like to know how to turn off theme .
Dimitrina
Telerik team
 answered on 04 Nov 2009
1 answer
130 views
When the ItemsSource property is set by a background task (periodic timer), the RadPanelBar resets, i.e. the panels collapse and the selected item highlight disappears.

I have implemented a cache to save the state of the RadPanelBar and RadPanelBarItems so that it can be restored to its original state, after the ItemsSource property has been set. However this is causing a horrible flicker.

Is there a way to maintain the state of the RadPanelBar after the ItemsSource property has been set without having to do manually?

Would binding to an ObservableCollection instead make any difference?
(admittedly perhaps I should have done this in the first place, but didn't know about it until recently).

Thanks.
Tihomir Petkov
Telerik team
 answered on 04 Nov 2009
1 answer
76 views
Hi Guys,

I was using the Telerik dll version 2009.2.701. something. At that time, if I switch the positions of two records, I would not lose the focus/selection on the original record. But after I upgraded to 2009.2.813. something, I am losing the focus after I switch the records. What I am trying to do now is to manually set the grid.Records[1].IsSelected = true. But it is not working. Any suggestions?

Thanks,
Milan
Telerik team
 answered on 04 Nov 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?