Telerik Forums
UI for WPF Forum
1 answer
204 views
Hi,
      I am using a RadTabControl and the RadTabItems are created using a datatemplate. I am having an RadPanelbaritem as accordion inside the tabcontrol. I am using MVVM model and there is no code behind. when the tab selection changes, the search will be based on the tab id and if i click on the panelbaritem, the search will be done within that panelbaritem. If i click again on the same tab(Selection Changed will not be fired here) the search should be done for that tab id. Since there is no click event for the tab control and the selection changed event will not fire within the same tab, i used MouseLeftButtonUp event to capture the click event. but during clicking of the radpanelbaritem, it even triggers the mouseleftbuttonup event instead of Accordion Selection Changed event. Which event should i capture for refreshing the tab?

Thanks in advance
R.Saranya.
Petar Mladenov
Telerik team
 answered on 25 Nov 2010
1 answer
104 views
I saw a post from the May timeframe indicating that switching to the page of a specific row was not possible. Has there been any progress on this issue?
http://www.telerik.com/community/forums/wpf/gridview/paging-focus-sepecific-row.aspx#1197073

What we're trying to achieve is a 'quick navigation' style grid, where the user has a text box at the top that they can use to search across all columns and then snap to the selected item on a specific page.

Thanks in advance.
Veselin Vasilev
Telerik team
 answered on 25 Nov 2010
2 answers
222 views
Hello,

I want to implement a ComboBox in two of my FilterDescriptors. I do exactly the same as in the Demos, and it does not work at all. My ComboBox return value is String, I checked it and it returns the value I want. But the DataFilter does not filter the DataGrid. It work with the regular text input method, but not with the ComboBox. 

Here is what I've done:
<DataTemplate x:Key="RegionFilterEditorTemplate">
            <telerik:RadComboBox SelectedValue="{Binding Path=NAME, Mode=TwoWay, FallbackValue=null}" DisplayMemberPath="NAME" SelectedValuePath="NAME"
                                     MinWidth="100" SelectionChanged="RegionSelected"/>
        </DataTemplate>
        <DataTemplate x:Key="MUNFilterEditorTemplate">
            <telerik:RadComboBox SelectedValue="{Binding Path=NAME, Mode=TwoWay, FallbackValue=null}" DisplayMemberPath="NAME" SelectedValuePath="NAME"
                                     MinWidth="100" SelectionChanged="MunicipalitySelected"/>
        </DataTemplate>
        <local:MyEditorTemplateSelector x:Key="MyEditorTemplateSelector">
            <local:MyEditorTemplateSelector.EditorTemplateRules>
                <local:EditorTemplateRule PropertyName="N_MUN.N_REGION.NAME"
                                              DataTemplate="{StaticResource RegionFilterEditorTemplate}"/>
                <local:EditorTemplateRule PropertyName="N_MUN.NAME"
                                              DataTemplate="{StaticResource MUNFilterEditorTemplate}"/>
            </local:MyEditorTemplateSelector.EditorTemplateRules>
        </local:MyEditorTemplateSelector>
<telerik:RadDataFilter Name="CitiesFilter" Source="{Binding}" Loaded="CitiesFilter_Loaded" AutoGenerateItemPropertyDefinitions="False" CanUserCreateCompositeFilters="False" EditorCreated="OnRadDataFilterEditorCreated" EditorTemplateSelector="{StaticResource MyEditorTemplateSelector}" >
                    <telerik:RadDataFilter.ItemPropertyDefinitions>
                        <datafilter:ItemPropertyDefinition PropertyName="N_MUN.N_REGION.NAME" PropertyType="{Binding String, Source={StaticResource Types}}" DisplayName="Област" />
                        <datafilter:ItemPropertyDefinition PropertyName="N_MUN.NAME" PropertyType="{Binding String, Source={StaticResource Types}}" DisplayName="Община" />
                        <datafilter:ItemPropertyDefinition PropertyName="NAME" PropertyType="{Binding String, Source={StaticResource Types}}" DisplayName="Населено място" />
                    </telerik:RadDataFilter.ItemPropertyDefinitions>
                </telerik:RadDataFilter>
<telerik:RadGridView x:Name="CitiesGrid" ItemsSource="{Binding FilteredSource, ElementName=CitiesFilter}"
                                     AutoGenerateColumns="False"
                                     IsReadOnly="True"
                                     ScrollMode="RealTime"
                                     CanUserReorderColumns="False"
                                     GridLinesVisibility="Both"
                                     IsFilteringAllowed="False"
                                     ShowGroupPanel="False"
                                     ColumnWidth="Auto">
                                      
                    <telerik:RadGridView.Columns>
 
 <telerik:GridViewDataColumn Header="{x:Static res:CitiesDialogFormRes.REGION}"
                                                    DataMemberBinding="{Binding Path=N_MUN.N_REGION.NAME}"
                                                    Width="Auto"/>
                        <telerik:GridViewDataColumn Header="{x:Static res:CitiesDialogFormRes.MUN}"
                                                    DataMemberBinding="{Binding Path=N_MUN.NAME}"
                                                    Width="Auto" />
                        <telerik:GridViewDataColumn Header="{x:Static res:CitiesDialogFormRes.CITY}"
                                                    DataMemberBinding="{Binding Path=NAME}"
                                                    Width="Auto" />
 
 
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>

And the .cs file:
                  
private void OnRadDataFilterEditorCreated(object sender,Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
 
            switch (e.ItemPropertyDefinition.PropertyName)
            {
                case "N_MUN.N_REGION.NAME":
                    regionComboBox = (RadComboBox)e.Editor;
                    regionComboBox.ItemsSource = db.N_REGION.OrderBy(N_REGION => N_REGION.NAME);
                    break;
                case "N_MUN.NAME":
                    munComboBox = (RadComboBox)e.Editor;
                    break;
                    
            }
        }
 
private void CitiesFilter_Loaded(object sender, RoutedEventArgs e)
        {
            FilterDescriptor regionsFilterDesc = new FilterDescriptor("N_MUN.N_REGION.NAME", FilterOperator.IsEqualTo, "", true);
            FilterDescriptor munsFilterDesc = new FilterDescriptor("N_MUN.NAME", FilterOperator.IsEqualTo, "", true);
            this.CitiesFilter.FilterDescriptors.Add(regionsFilterDesc);
            this.CitiesFilter.FilterDescriptors.Add(munsFilterDesc);
        }
 
private void RegionSelected(object sender, SelectionChangedEventArgs e)
        {
            regionComboBox = (RadComboBox)e.OriginalSource;
            var selectedRegion = regionComboBox.SelectedValue;
            munComboBox.ItemsSource = db.N_MUN.Where(N_MUN => N_MUN.N_REGION.NAME.Equals(selectedRegion)).OrderBy(N_MUN => N_MUN.NAME);
        }
Hristiliyan
Top achievements
Rank 1
 answered on 25 Nov 2010
2 answers
96 views
Hi All,

I have two line series on my chart area. I  want to show custom tooltip on ItemTooltipOpening event. I have one problem while showing tooltip, how do I recognize that on which lineseries datapoint mouse hover?
I want to show different tootip with single ItemTooltipOpening  event ?
how do I capture particular line series?

Thanks,
shashank
Top achievements
Rank 1
 answered on 25 Nov 2010
2 answers
140 views
When using docking from ActiPro there is a nice feature:
- when you undock a ToolWindow/Pane, you can use MouseDoubleClick to dock the window back in the original place. Nice!

Does Telerik Docking have something alike? Or is it easy to implement?
George
Telerik team
 answered on 24 Nov 2010
1 answer
137 views
Is it possible to apply styling to a tabitem whose isEnabled property is set to False?

Thanks,
Petar Mladenov
Telerik team
 answered on 24 Nov 2010
1 answer
119 views
Hi there,
i am testing the new control SchedulerView and was trying to change the orientation of the views (day, week, etc..) and was trying to do like in your demo that have the Property Orientation in all the ViewDefinitions.
I am using the last versions published for you guys and i still can't get this to work using that property in ViewDefinition in fact for intellisense is like doesn' t exist either..
I will attach an jpeg to show you my xaml file

Thanks for the time,
Pedro Pereira
Pedro
Top achievements
Rank 1
 answered on 24 Nov 2010
3 answers
367 views
Hello,

I am currently implementing a localization in our application. The headers of the columns and all captions of all controls are referenced to dynamic resources like that:

<telerik:GridViewDataColumn DataMemberBinding="{Binding ArtikelNr}" Header="{DynamicResource ArtikelNr}" IsReadOnly="True"/>


I am switching the culture during runtime with this function:

public class ResourceManager
    {
        public static void SetResources(Collection<ResourceDictionary> collection, CultureInfo culture)
        {
            RemoveOld(collection);
 
            try
            {
                Uri resource = new Uri("Resources/Strings_" + culture.Name + ".xaml", System.UriKind.Relative);
                collection.Add(new ResourceDictionary { Source = resource });
            }
            catch
            {
                // TODO: Handle this, is it possible to be here?
            }
        }
 
        private static void RemoveOld(Collection<ResourceDictionary> collection)
        {
            for (int i = 0; i < collection.Count; ++i)
            {
                if (collection[i].Source.ToString().Contains("Strings_"))
                {
                    collection.RemoveAt(i);
                    --i;
                }
            }
        }
 
        public static List<CultureInfo> SupportedCultures
        {
            get
            {
                return new List<CultureInfo>()
                {
                    new CultureInfo("de-DE"), // DEU
                    new CultureInfo("ru-RU"), // ENU
                };
            }
        }
    }


public void SetCulture(CultureInfo culture)
{
    Thread.CurrentThread.CurrentCulture = culture;
    Thread.CurrentThread.CurrentUICulture = culture;
    ResourceManager.SetResources(Resources.MergedDictionaries, culture);
}

The column headers of the gridview are ignoring the dynamic resources. But the resources are correctly added to the MergedDictionaries-Collection. All other controls (RadControls too) are using the dynamic resources fine.

Do have any ideas what's going wrong with the columns?
Maya
Telerik team
 answered on 24 Nov 2010
1 answer
75 views
hi

   i m using kml file to import data to the rad map using StreamResourceInfo , but its throw an exception error like "The invocation of the constructor on type ,that matches the specified binding constraints trew an exception " so i don't know how to handle this, could any one help to get out of this issue.
Andrey
Telerik team
 answered on 24 Nov 2010
1 answer
204 views
After combining the code from multiple examples in the forum, I am really close to getting my search working for my TreeView.  However, as other people have found, it will only work if I expand my whole tree first.  What do I need to modify in my code to make this work correctly?  Obviously, if my users have to expand the whole tree first, the search option is pretty useless.

thanks!
Koren

        private void SearchList(string searchValue)
        {
            ControlTemplate tt = (ControlTemplate)baseFrameworkElement.FindResource("NavigationContentTemplate");
            ContentControl tc = (ContentControl)baseFrameworkElement.FindName("NavigationContent");
            _treeView = tt.FindName("NavigationList", tc) as RadTreeView;
           
            //_treeView.ExpandAll();
            //_treeView.CollapseAll();
            SearchTree(searchValue.ToLower(), _treeView);
        }
        private void SearchTree(string searchValue, ItemsControl item)
        {           
            for (int i = 0; i < item.Items.Count; i++)
            //foreach (var _dataItem in item.Items)
            {
                //RadTreeViewItem _childItem = treeView.ContainerFromItemRecursive(_dataItem);
                RadTreeViewItem _childItem = item.ItemContainerGenerator.ContainerFromIndex(i) as RadTreeViewItem;
                if (_childItem != null)
                {
                    //MessageBox.Show(_childItem.ToString());

                    if (_childItem.Item is Association)
                    {
                        Association _childObject = _childItem.Item as Association;
                        if (_childObject.AssociationName.ToLower().Contains(searchValue))
                        {
                            if (_childItem.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
                            {
                                _childItem.IsExpanded = true;
                                _childItem.BringIntoView();
                            }
                        }

                    }
                    else if (_childItem.Item is Economist)
                    {
                        Economist _childObject = _childItem.Item as Economist;
                        if (_childObject.EconomistName.ToLower().Contains(searchValue))
                        {
                            if (_childItem.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
                            {
                                _childItem.IsExpanded = true;
                                _childItem.BringIntoView();
                            }
                        }

                    }
                    else if (_childItem.Item is Farm)
                    {
                        Farm _childObject = _childItem.Item as Farm;
                        if (_childObject.FarmName.ToLower().Contains(searchValue) || _childObject.FarmNbr.Contains(searchValue))
                        {
                            if (_childItem.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
                            {
                                _childItem.IsExpanded = true;
                                //_childItem.IsSelected = true;
                                _childItem.BringIntoView();
                            }
                        }

                    }
                    SearchTree(searchValue, _childItem);
                }
            }
        }

Viktor Tsvetkov
Telerik team
 answered on 24 Nov 2010
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?