Telerik Forums
UI for WPF Forum
6 answers
88 views
Hi,

I have used grouping and filtering programmatically in my  application by following the post below.
http://www.telerik.com/community/forums/wpf/gridview/group-aggregate-without-displaying-the-group-panel.aspx 

But after I upgraded my controls to 2012 Q1, the grouping event is not triggered at all.

Vera
Telerik team
 answered on 27 Jun 2012
1 answer
152 views
Shouldn't this code prevent the close from happening?

void OnClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)
{
    e.Handled = true;
}

The problem is that with the latest build 2012.2.620, after executing the following code, RadDocking throws an exception in Close() be cause the RadPaneGroup.Items have been cleared.  This does not happen in version 2012.2.607; in that version this works like a charm.
void OnClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)
{
    RadPane pane = e.Panes.ToList()[0];
    RadPaneGroup group = pane.PaneGroup;
    if (closeAll)
    {
        group.Items.Clear();
        e.Handled = true;
    }
}

Thanks in advance,
Steve






Georgi
Telerik team
 answered on 27 Jun 2012
1 answer
106 views
Hi all
As i hover on item1 and the click outside the dropdownbutton, dropdownbutton does not closes. below is the code to reproduce it.
<telerik:RadRibbonDropDownButton Grid.Row="1">
            <telerik:RadRibbonDropDownButton.DropDownContent>
                <telerik:RadContextMenu>
            <telerik:RadMenuItem Header="Item1">
            <telerik:RadMenuItem Header="Item1.1" >
                
                </telerik:RadMenuItem>
            </telerik:RadMenuItem>
            </telerik:RadContextMenu>
            </telerik:RadRibbonDropDownButton.DropDownContent>
            </telerik:RadRibbonDropDownButton>

Thanks
Deepak
Tina Stancheva
Telerik team
 answered on 27 Jun 2012
1 answer
125 views
 Here is the code where the theme for the GirdView is bound to the ViewModel's SelectedTheme property. The problem is with the custom header column that includes a checkbox. The UI has a combobox that allows the user to select a theme which is bound to the SelectedTheme property of the viewmodel. When I try to change the theme, I get the following exception:

Specified element is already the logical child of another element. Disconnect it first.

 If I comment out the section
<telerik:GridViewCheckBoxColumn.Header> from the code then it is fine. I don't get any exception when dynamically setting the theme for the gridview.


<telerik:RadGridView Name="radGridView"
                                         SelectionMode="Extended"
                                         EnableRowVirtualization="True"
                                         FrozenColumnCount="1"
                                         AlternationCount="2"
                                         AutoGenerateColumns="False"
                                         telerik:StyleManager.Theme="{Binding SelectedTheme}">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected, Mode=TwoWay}"
                                                            EditTriggers="CellClick"
                                                            AutoSelectOnEdit="True">
 
                                <telerik:GridViewCheckBoxColumn.Header><!--this part throws exception if gridview is bound to the vm's theme property-->
                                    <StackPanel Orientation="Horizontal">
                                        <CheckBox Name="chkAllSelect"
                                                  VerticalAlignment="Center"
                                                  Click="chkAllSelect_Click"                                                  
                                                  IsChecked="{Binding AreAllSelected, Mode=TwoWay}" /> <!--this binding seems not possible-->
                                        <TextBlock Text="Select"
                                                   VerticalAlignment="Center"
                                                   Margin="5,0,3,0" />
                                    </StackPanel>
                                </telerik:GridViewCheckBoxColumn.Header> 
                            </telerik:GridViewCheckBoxColumn>                            
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
Ivan Ivanov
Telerik team
 answered on 27 Jun 2012
5 answers
122 views
hello
i have a problem with the gridview
when i get the data from datatable to use in the grid the result is good but when i use the horizotal scroll to see a results(there are 30 column)the values disapear and the cells are empty!!
can you help me plz?
 there is a code:
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection("Data Source=.;Initial Catalog=OptimisationDataBase;Integrated Security=True");
 string str2 = "SELECT * FROM [OptimisationDataBase].[dbo].[CDRMaxCI] WHERE [OptimisationDataBase].[dbo].[CDRMaxCI].[Cell ID] = 57042 OR [OptimisationDataBase].[dbo].[CDRMaxCI].[Cell ID] = 57312";
                     
                    connection.Open();
                    SqlDataAdapter sqlda = new SqlDataAdapter(str2, connection);
                    sqlda.Fill(dt);
                    connection.Close();
                    this.GridViewKPI.ItemsSource = dt;
Dimitrina
Telerik team
 answered on 27 Jun 2012
4 answers
336 views

In my usage of the ChartCiew I have three line series drawn on a chart per date, all of which share the same colour which are distinguished by using the DashArray property of the LineSeries class to make one solid, one dotted (1,1) and one dashed (3,3).  Each different date shown on the chart uses a different colour.

I can't seem to figure out how to make a legend that replicates the line drawn on the chart using the dash array property, do you have any advice? 


I have looked at your examples and can't see one that does what I want.

I can't really attach the code but I have attached an image showing a chart containing two LineSeries (one solid and one dashed) and my desired legend to indicate my requirements.

Thanks,

Evgenia
Telerik team
 answered on 27 Jun 2012
3 answers
187 views
Hi,

is it possible to set the Root-Fodler of the FolderBrowserDialog from the  RadRichTextBoxribbonUI? <telerik:RadRichTextBoxRibbonUI>
lderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = programFiles;
dialog.ShowDialog();

in the Backstage Area i use this RadRibbonButton and the : telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}"
<telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="pdf" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" Width="90">
   <StackPanel Width="90">
      <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Pdf.png" Stretch="None" />
   </StackPanel>
</telerik:RadRibbonButton>

Is it possible to set the RootFolder of the "SaveCommand"??? Something like RadRibbonButton.FolderDialog.SelectedPath= ??

Thanks a lot
Best Refards
rene
ITA
Top achievements
Rank 1
 answered on 27 Jun 2012
5 answers
307 views
The Data Service sample works fine when you instantiate a concrete service context object directly in the XAML of the RadDataServiceDataSource.

Should it be possible to data bind to the DataServiceContext property of a RadDataServiceDataSource instead?

I have an app that allows the choice of several OData services. When a service is chosen, I dynamically generate a service client proxy, and activate a new instance of that proxy's exported DataServiceContext-derived class. Now I want to bind that to my RadDataServiceDataSource (and of course change the binding to a completely different context if another OData service is chosen).
These are all read-only services, so I'm not concerned about maintaining any consistency of client-side update state.

It seems that when the DataServiceContext is set via a binding, the grid shows no data.

It seems that queries are never issued to the context:

System.ArgumentException: Could not find a matching query method on the DataServiceContext

Maybe the RadDataServiceDataSource is reflecting on the declared type of the bound property (DataServiceContext) instead of its runtime type (generated in the proxy and unavailable to me at design-time)?
Rossen Hristov
Telerik team
 answered on 27 Jun 2012
1 answer
125 views
Hi,

Is it possible to set the mail merge features via the UI to add text before and text after a field if it isn't empty?
I have seen that this is possible in code behind but I can't see to find a way to do it via the RadRichTextBox UI.

Thank you for your time,

Rob
Iva Toteva
Telerik team
 answered on 27 Jun 2012
2 answers
206 views
Good day,

We have a GridView and would like to do enter key traversing instead of doing Tab key traversing, when editing a row.
Note that we are using MVVM type architecture.

For a normal grid, the following works fine, but does not seem to work on the telerik RadGridView:

public class EnterKeyTraversal
{
        public static bool GetIsEnabled(DependencyObject obj)
        {
            return (bool)obj.GetValue(IsEnabledProperty);
        }
 
 
        public static void SetIsEnabled(DependencyObject obj, bool value)
        {
            obj.SetValue(IsEnabledProperty, value);
        }
 
 
        static void ue_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
        {
            var ue = e.OriginalSource as FrameworkElement;
 
 
            if (ue != null && (e.Key == Key.Enter && ue.GetType() != typeof(Button)))
            {
                e.Handled = true;
                ue.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
            }
        }
 
 
        private static void ue_Unloaded(object sender, RoutedEventArgs e)
        {
            var ue = sender as FrameworkElement;
            if (ue == null)
                return;
 
 
            ue.Unloaded -= ue_Unloaded;
            ue.PreviewKeyDown -= ue_PreviewKeyDown;
        }
 
 
        public static readonly DependencyProperty IsEnabledProperty =
                DependencyProperty.RegisterAttached("IsEnabled", typeof(bool),
                typeof(EnterKeyTraversal), new UIPropertyMetadata(false, IsEnabledChanged));
 
 
        static void IsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var ue = d as FrameworkElement;
            if (ue == null)
                return;
 
 
            if ((bool)e.NewValue)
            {
                ue.Unloaded += ue_Unloaded;
                ue.PreviewKeyDown += ue_PreviewKeyDown;
            }
            else
            {
                ue.PreviewKeyDown -= ue_PreviewKeyDown;
            }
        }
}


Any help would be much appreciated.
Kind regards
Chris Coetzee
Top achievements
Rank 1
 answered on 27 Jun 2012
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
Book
FileDialogs
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
Rating
SplashScreen
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?