Telerik Forums
UI for WPF Forum
3 answers
133 views

Hello,

I have a spline series on a cartesian graph, the y values can vary from -750000 to 1000000. I would like to display the labels as multiples of .0001 to save some screen space. I can't see a property to do it.

Thanks.

Alan

Martin Ivanov
Telerik team
 answered on 20 Aug 2019
2 answers
600 views

Saw instructions on how to use tags GroupByExpression, SelectFields, GroupByFields to sort groups by a sequence number.  However, these tags are not available to me to use.

 

So, I would like to use standard RadGridView properties and techniques to create 3 groups that will be sorted by a sequence number...

 

3 Columns: Process, Date, Version

3 Groups ordered top to bottom: Group1, Group2, Group3.

When I click on the column name "Process" for example, currently the groups move up or down.

I want to keep the groups in the same visual order Group1, Group2, Group3 but only sort each column within the group.

Any ideas?

Keith
Top achievements
Rank 1
 answered on 19 Aug 2019
1 answer
209 views

I have a RadGridView, in the first column is an AutoCompleteBox for searching names. I will search name and paste in to the same column. 

I have build the AutoCompleteBox in RadgridView.CellEditTemplate like this:

 

<telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                                        TextSearchMode="Contains"
                                                        TextSearchPath="Name"
                                                        SearchText="{Binding Path=Name, Mode=TwoWay}"
                                                        AutoCompleteMode="Suggest"
                                                        SelectionMode="Single"     
                                                        BoxesItemStyle="{StaticResource RadAutoCompleteBoxStyle}"
                                                        NoResultsContentTemplate="{StaticResource RadAutoCompleteBoxNoResultsContentTemplate}"
                                                        NoResultsContent="{x:Static resources:Translations.lbl_NoMatches}"
                                                        ItemsSource="{Binding Path=DataContext.Project.Customers, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}">

 

But i always get error "System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'", if i type in the column. DisplayMemberPath="Name" and SearchText="{Binding Path=Name, Mode=TwoWay}" ara in conflict. Can sameone help me?

 

Thanks in advance.

 

Martin Ivanov
Telerik team
 answered on 19 Aug 2019
4 answers
435 views

Hi Telerik,

I'm using a RadTreeListView with allowed filters.

> 'MyTreeListView.png' showing you my expanded tree.

 

When I click on the filter buttons, the panel is displayed, but in the values area, there are only the values of the "parent" rows (like in the 'Filter1' & 'Filter2' attached files).

 

I want to know if is it possible to display all existing values in the column ?

For example, in 'Filter2' screen, there will be :

[ ] nul

[ ] Task 1.1 A

[ ] Task 1 A

[ ] Task 1 B

[ ] Task 2 A

 

Thank you !

Valentin.

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 19 Aug 2019
4 answers
259 views
Hi,
How do I set the background color of the ControlPanel of the RadGridView ?
Barry
Martin Ivanov
Telerik team
 answered on 19 Aug 2019
4 answers
247 views
Hello,

I need help regarding the TreeListView's Expand/Collpase event. I am unable to capture these events  when i click on the expander.

The code is as follows:-

WPF XAML File:-

  <telerik:RadTreeListView x:Name="radTreeListView" telerik:StyleManager.Theme="Windows7"
                                 AutoGenerateColumns="False" RowIndicatorVisibility="Collapsed" 
                                 ScrollViewer.VerticalScrollBarVisibility="Hidden"
                                 TreeViewItem.Collapsed="radTreeListView_Collapsed"
                                 TreeViewItem.Expanded="radTreeListView_Expanded" >
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding TopLevelObjects}"/>
            </telerik:RadTreeListView.ChildTableDefinitions>
            <telerik:RadTreeListView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding LHS}"
                                   Header="Name"/>
           
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>

The two function radTreeListView_Collapsed(..) & radTreeListView_Expanded(..) are not getting called.


Thanks,
Neha
Martin Ivanov
Telerik team
 answered on 16 Aug 2019
2 answers
803 views

Hello,

I am trying to export the data of my whole RadGridView to CSV.

Now I got a problem.

I used this Code:

public void PdfExport(RadGridView grid)
        {
            string extension = "pdf";

            SaveFileDialog dialog = new SaveFileDialog()
            {
                DefaultExt = extension,
                Filter = String.Format("{1} files (.{0})|.{0}|All files (.)|.", extension, "Pdf"),
                FilterIndex = 1
            };

            if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                using (Stream stream = dialog.OpenFile())
                {
                    grid.ExportToPdf(stream,
                        new GridViewPdfExportOptions()
                        {
                            ShowColumnFooters = true,
                            ShowColumnHeaders = true,
                            ShowGroupFooters = true,
                            AutoFitColumnsWidth = false,
                            PageOrientation = PageOrientation.Landscape
                        });
                }
            }
        }

When I use this Code and open it with Visual Studio Code, the csv-file is comma seperated and every word is in quotes.

When I build a csv-file with Microsoft Excel it is ";"-seperated and without quotes.

 

How can I export my whole RadGridView with ","-seperated words that are without quotes?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Aug 2019
3 answers
268 views

I'm adding a system generated paragraph with 3-4 lines to the end of every XAML document on the server side and I want to make sure that these lines are always on the same page. Either they all fit or they should be moved to the next page.
I’ve tried to detect this overlap by checking number of pages before and after this addition via DocumentLayoutBox, but PageNumber of last ChildLayoutBoxes is not changing.
Additionally, it would be nice to have a feature to allow paragraph alignment to the bottom of the page.

 

Regards,

Vitalij

Boby
Telerik team
 answered on 16 Aug 2019
6 answers
3.0K+ views
Hi

I'm currently testing the UI for WPF and there's one problem I can't seem to solve. I wrote a small APF application using the Windows8-Theme. I change some Fonts, Font sizes and Colors of the palette and apply it as my application theme in the Code Behind.

Now I've got a TreeView where I'm dynamically adding children. This works as intended so far, but when an item in the TreeView is selected, the background color of the Selection-Border is blue (which is fine) but the font color is still black, which makes the name of the selected item hard to read.

So I tried to change the Foreground-Property of the currently selected item. There are two ways I tried out yet. First, I tried to change the style via XML by binding a style with a trigger to the ItemContainerStyle property of the TreeView, like this:

<telerik:RadTreeView ItemContainerStyle="{StaticResource SelectedTreeViewItem}" x:Name="TreeViewDomain">

And this is the Resource for the style:

<Style x:Key="SelectedTreeViewItem" TargetType="{x:Type telerik:RadTreeViewItem}">
      <Style.Triggers>
          <Trigger Property="IsSelected" Value="true">
              <Setter Property="Foreground" Value="White"/>
          </Trigger>
      </Style.Triggers>
</Style>

It kind of does the job but only kind of, because it also changes the Foreground color of all child elements of the selected item. I don't know if I did anything wrong there or if forgot something (I'm still fairly new to WPF) but this is not the behavior I expected.

I tried another approach: good old event driven Code Behind. Just change the Foreground color of the sender when the PreviewSelected event fired:

void __childItem_PreviewSelected(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    var __currentNode = (RadTreeViewItem) sender;
    __currentNode.Foreground = Brushes.White;
}

But same problem here: the Font color of the selected item changes, but so does the font color of all child items. I first thought this had something to do with event routing but that seems not to be the case. Since I'm adding children dynamically with Code Behind, I tried changing the Foreground color first and then added the child nodes but with the same result. They somehow seem to inherit the Foreground color of the parent.

Now I know that since I'm using the Windows8 Theme that I could make a local copy of the Theme-XAML, reference this one instead of the standard ones in the GAC from Telerik and change the color directly there. But I'm still curious as to why the control is behaving in they way I'm experiencing it in this case.

Any suggestions?

Regards,
Steve.
Martin Ivanov
Telerik team
 answered on 16 Aug 2019
3 answers
246 views

Hi there! 
i have RadGrid that i want it to be edited by user in run time which allows him to delete ,insert,and update then i have to perform this changes on the entity database so how can i do this 
how can i insert new row and get the data that inserted in each field on it
how can i get the updates

i tried this code but it returns the old data not the new one which i add by editting

 foreach (GridDataItem editedItem in RadGrid1.Items)
                {
                    Hashtable newValues = new Hashtable();
                    //The GridTableView will fill the values from all editable columns in the hash
                   int i=int.Parse( editedItem.GetDataKeyValue("id").ToString());
                   editedItem.ExtractValues(newValues);
                   akaratCBContext conn = new akaratCBContext();
                   Product p = conn.Products.Where(prd => prd.id == i).FirstOrDefault();
                  p.ProductName= newValues["ProductName"].ToString();
                  p.Description= newValues["Description"].ToString();}

Dilyan Traykov
Telerik team
 answered on 16 Aug 2019
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
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?