Telerik Forums
UI for WPF Forum
2 answers
234 views

Hi,
  
<telerik:RadGridView x:Name="radGridView" ShowGroupPanel="False" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
.....

</telerik:RadGridView>

ViewModel
----------

        private ObservableCollection<ClientDataRealizationModel> _dataList
        public ObservableCollection<ClientDataRealizationModel> DataList
        {
            get { return _dataList}
            set { _dataList= value; OnPropertyChanged("DataList"); }
        }

        private void OnFilter(string year)
        {
          var list = _dataList.Where(x => x.Year == year).Select(x => x);
           _dataList= new ObservableCollection<DataModel>(list);
        }



The filtered data is not showing. Should we refresh the grid ? Can anyone help me out to solve this issue.
Dimitrina
Telerik team
 answered on 01 Jul 2013
3 answers
408 views
Hello Telerik team

I am trying to style RadMenuItem for my WPF application. I am almost done but I am stuck in one critical part.

I am mostly making use of submenuHeader, so I styled the HighlightVisual to suit my needs (for example changed color to green)
The place that was affecting mentioned HighlightVisual was in the trigger Role of SubmenuHeader.

            <Trigger Property="Role"
                     Value="SubmenuHeader">
                           ...
           <Border x:Name="HighlightVisual"                                        
                                            BorderThickness="1"
                                            CornerRadius="1"
                                            Visibility="Collapsed"
                                            Background="Green" />     

In the same role (SubmenuHeader) I also changed the background of the popup (for example Yellow)
                     ...
     <Popup x:Name="PART_Popup"
                                       AllowsTransparency="True"
                                       Focusable="False"
                                       HorizontalOffset="1"
                                       IsOpen="{TemplateBinding IsSubmenuOpen}"
                                       VerticalOffset="-1" >                                  
                                    
                                    <Grid>    
                                        <Grid x:Name="PopupContentElement">                                        
                                            <Border BorderBrush="#FF848484"
                                                    BorderThickness="1"
                                                    Background="Yellow">

Now my problem is this : How do I change the Highlight color of the items in the popup ? I can see that there is an ItemsPresenter defined in the submenuHeader's popup that probably contains radMenuItems, with a default Highlight (border background) color of a yellow gradient but I don't know where this is coming from or is defined. I need to override this default color so my context menu is consistent. Any help would be appreciated.

Telerik version 2012.1.0402
Thanks in advance
Rosen Vladimirov
Telerik team
 answered on 01 Jul 2013
6 answers
253 views
Hello,

I'm using the ItemChanged event but when the user write a value in a filter, the event is not raised until the user press the enter key.
I need to know when the user change the filter value on property changed.
How can I handle this,

Thank you,

Benjamin
Benjamin
Top achievements
Rank 1
 answered on 29 Jun 2013
1 answer
221 views
Is it possible to have the RichTextBox use a canvas as the editing area?

I am trying to create an application where the user is putting text and images on a canvas.   They can then apply affects to the text.  It is basically so they can create templates to print on T-Shirts.  So the location of items has to be exact.

Is that possible?
Petya
Telerik team
 answered on 28 Jun 2013
4 answers
181 views
Hi there! 

I have a RadDiagram project that I'm currently working on and need a bit of advice on the best approach. Currently, I am listing out an ObservableCollection called CurrentExampleItems and binding it to an ItemsControl, and the DataTemplate is a UserControl of a CustomShape. I'd like to allow users to drag the UserControl from the StackPanel and have it drop on the grid, but to not create a copy. The idea being that there is only one of these ExampleItems that can be placed on the Grid, so if its on the grid, I dont want to show it in the StackPanel.

All examples I've played with our developed include the OnDragInitialize function to create a duplicate object based on the source, but I think I'd have to do something slightly different to enable this.

Any thoughts?


<StackPanel Background="White" x:Name="stackExampleItems" Orientation="Vertical" telerik:DragDropManager.AllowCapturedDrag="True" >
                    <ItemsControl ItemsSource="{Binding CurrentExampleItems}" >
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <local:ExampleItemView DataContext="{Binding }"   />
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </StackPanel>
Miro Miroslavov
Telerik team
 answered on 28 Jun 2013
5 answers
391 views
In the right-bottom corner of the RibbonView's Backstage there is an (office) image.
How could we change the image?
For us it's not important that the image changes when using different themes.
Kiril Vandov
Telerik team
 answered on 28 Jun 2013
1 answer
140 views
HI,
I have a all those3 controls in my form. Howerver, if the datapager page size is 10 and the gridview have more than 10 rows when i click add new in the data form it show a blank page. if gridview row has lees than the datapager size or I remove the datapager then it works fine.
Is there something I miss or this is a bug?
Thanks,
Ivan Ivanov
Telerik team
 answered on 28 Jun 2013
1 answer
99 views

Hi,

I have a situation where I have successfully shown data in a ParentGrid, but now I have setup a child grid but cant get it to display data.

XAML:

 <telerik:RadGridView Name="CustomersGrid" ShowInsertRow="True" Grid.Column="0" SelectionChanged="CustomersGrid_SelectionChanged">
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition/>
            </telerik:RadGridView.ChildTableDefinitions>            
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView Name="ChildGrid" ShowInsertRow="True" Loaded="ChildGrid_Loaded" />
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>


C#:

 public MainWindow()
        {
            InitializeComponent();
            var customers = Repo.GetCustomers();
            CustomersGrid.RowIsExpandedChanging += CustomersGrid_RowIsExpandedChanging;
            CustomersGrid.ItemsSource = customers;
            
            DataContext = this;
        }

This works fine and shows the child grid when clicking on the + sign. The ParentGrid is bound to Customers (Select * FROM Customers) I need to know how to bind the child grids to Agreements (Select * From Agreements where CUST_NO = '" + CUST_NO + "'"). I cant seem to access the Child Grid's itemsource to set the data binding.

What am I doing wrong?

Thank you very much!
Ron
Ivan Ivanov
Telerik team
 answered on 28 Jun 2013
3 answers
207 views
Hello,
I am applying filtering to a column in the treelist but upon filtering, only the top level rows are kept.Rows in the final results cannot be expanded or collapse. I would like to display all the children rows for the filtered data. How can I achieve this?
Thanks
Dimitrina
Telerik team
 answered on 28 Jun 2013
0 answers
254 views
Hi,

I like to get the current item in a drag & drop operation.
It´s shared code from silverlight and there it´s possible to get the current item with the following code:

private System.Windows.Controls.ListBoxItem GetItemFromPoint(FrameworkElement listBox, Point CurrentPoint)
{
  var p = listBox.TransformToVisual(App.Center.RootVisual).Transform(CurrentPoint);
  IEnumerable hits = VisualTreeHelper.FindElementsInHostCoordinates(p, listBox);
  System.Windows.Controls.ListBoxItem item = null;
 
  foreach (UIElement element in hits)
  {
    if (element is System.Windows.Controls.ListBoxItem)
    {
      item = (System.Windows.Controls.ListBoxItem)element;
      break;
    }
  }
 
  return item;
}

But now I´m using WPF and the RadListBox. The return type now is a RadListBoxItem and the parameter listBox is a RadListBox control.

Which opportunities do I have with the RadListBox in WPF?

Thanks
Mirko
Top achievements
Rank 1
 asked on 28 Jun 2013
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?