Telerik Forums
UI for WPF Forum
1 answer
124 views

It's hard to control is it show or hidden.

now i can only use remove and add form behaviors.

ShowTrackInfo and ShowIntersectionPoints can not totally control whole trackball

Martin Ivanov
Telerik team
 answered on 12 Dec 2018
12 answers
397 views
Hi

I am testing the RadRibbonView using PRISM. The RadRibbonView is set up as a region with modules populating the the View with RadRibbonTabs. I am looking for an example on how to dynamically add closable tab items in a TabControl defined as a separate region in the Shell from the RadRibbonTabs with a contextual group attached to every specific TabItem. So that when I select different TabItems in the TabControl I get a differenct contextual tab in the RadRibbonView for every TabItem.

Is there an example of this you could point me to?
Thomas
Top achievements
Rank 1
 answered on 12 Dec 2018
1 answer
116 views

Hello,

How do I format data (e.g. in GridViewDataColumn) to have a "%" prefix?
We do not want the value to be multiplied by 100 (e.g. when user enters "1", it should show "1%" instead of "100%")

Also, when data is null, it should show an empty field, "", instead of "%".

 

Thank you,

Jan

Stefan
Telerik team
 answered on 12 Dec 2018
2 answers
208 views

Hello,

I have a grid with a GridViewPinRowColumn and I need to detect, when the user has pinned or unpinned a row. Is there an event which I can subscribe?

Best regards,
Thomas

Thomas
Top achievements
Rank 2
Iron
 answered on 12 Dec 2018
1 answer
168 views

Is there a way of changing what group headers are shown depending on which columns have been grouped? 

I have a small banking application which displays a breakdown of all fees.

AllFees.PNG shows all of the fees ungrouped

GroupedByDesk.PNG shows the desired behaviour of grouping on any column other than currency (sums all of the rows 'Amount' values exchanged into a single currency)

GroupedByCurrency shows the desired behaviour of grouping by currency alone (sums all of the amounts in that currency)

Where it gets more interesting is if you group by Currency and another column. The desired behaviour is to show ONLY the exchanged sum in the header down in each group, and child group etc., until the Currency grouping, where you ONLY display the currency sum, as demonstrated in GroupByDeskThenCurrency.PNG

I have some working code that prevents the exchanged sum aggregate being displayed (as long as the Currency is the first grouping), but it's still not quite what the desired outcome is. Said code:

private void GridView_Grouped(object sender, Telerik.Windows.Controls.GridViewGroupedEventArgs e)
    {
      foreach (Telerik.Windows.Controls.GridViewColumn col in this.GridView.Columns)
      {
        col.AggregateFunctions.Clear();
      }

      bool groupedByCurrency = false;
      bool addedFxdSumAggregate = false;
      
      foreach (ColumnGroupDescriptor gd in this.GridView.GroupDescriptors)
      {
        if (gd.DisplayContent.ToString() == "Currency")
        {
          groupedByCurrency = true;
          this.GridView.Columns["Currency"].AggregateFunctions.Add(this.currSumFunction);
        }

        if (!groupedByCurrency && !addedFxdSumAggregate)
        {
          this.GridView.Columns[gd.DisplayContent.ToString()].AggregateFunctions.Add(this.fxableSumFunction);
          addedFxdSumAggregate = true;
        }
      }

 

 

 

Vladimir Stoyanov
Telerik team
 answered on 11 Dec 2018
9 answers
1.1K+ views
Hi,

I'm having difficulty trying to build a multi level hierarchy that has unknown levels.
I've read loads and loads of examples but they all assume the number of levels are known. However, in my case I may have "x" number of nodes, which may have "x" number of child nodes, which may have "x" number of grandchild nodes etc etc.

My data is drawn from an SQL database where I use the SQL 2008 HierarchyID data type to represent my hierarchy in the database.

I've built the following class for my products:



public class Products : INotifyPropertyChanged, IDataErrorInfo
{
private Int64 m_ID;
private SqlHierarchyId m_Hierarchy;
private string m_Name;
private Int16 m_Level;
private ObservableCollection<Products> m_ChildProducts;
// Default Constructor
public Products()
{
ChildProducts = new ObservableCollection<Products>();
}
//Properties
public Int64 ID
{
get
{
return m_ID;
}
set
{
m_ID = value;
OnPropertyChanged(new PropertyChangedEventArgs("ID"));
}
}
public SqlHierarchyId Hierarchy
{
get
{
return m_Hierarchy;
}
set
{
m_Hierarchy = value;
OnPropertyChanged(new PropertyChangedEventArgs("Hierarchy"));
}
}
public Int16 Level
{
get
{
return m_Level;
}
set
{
m_Level = value;
OnPropertyChanged(new PropertyChangedEventArgs("Level"));
}
}
public String Name
{
get
{
return m_Name;
}
set
{
m_Name = value;
OnPropertyChanged(new PropertyChangedEventArgs("Name"));
}
}
public ObservableCollection<Products> ChildProducts
{
get
{
return m_ChildProducts;
}
set
{
m_ChildProducts = value;
OnPropertyChanged(new PropertyChangedEventArgs("ChildProducts"));
}
}
//INotifyPropertyChanged Event
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged(PropertyChangedEventArgs e)
{
if (PropertyChanged != null)
PropertyChanged(this, e);
}
}


I then have the following method to download data from the database which I need to some how construct an ObservableCollection() which contains nodes "x" number of levels deep. Please note that some nodes may be 2 levels deep, others may be 3 levels deep, so forth and so forth.


public static ObservableCollection<Products> GetProductsHierarchy()
        {
            ObservableCollection<Products> products = new ObservableCollection<Products>();
 
            SqlConnection connection = new SqlConnection(DBConnection.GetConnection().ConnectionString);
 
            string selectStatement = "SELECT ID, Hierarchy, Name " +
                                     "FROM SpecProducts " +
                                     "WHERE (EnableDisable IS NULL)" +
                                     "ORDER BY Hierarchy";
 
            SqlCommand selectCommand = new SqlCommand(selectStatement, connection);
 
            try
            {
                connection.Open();
                SqlDataReader reader = selectCommand.ExecuteReader();
 
                while (reader.Read())
                {
                     
                    Products product = new Products();
                    product.ID = (Int64)reader["ID"];
                    product.Name = reader["Name"].ToString();
                    product.Hierarchy = (SqlHierarchyId)reader["Hierarchy"];
                    product.Level = (Int16)product.Hierarchy.GetLevel();
 
                    //**** How to create recursive loop to add unknown levels to nodes???? ****
 
                    products.Add(product);
                }
 
 
                return products;
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                connection.Close();
            }
        }


I've found a post that discusses unlimited nodes, http://www.telerik.com/community/forums/wpf/treeview/templated-node-multiple-parent.aspx , but in the example given it has the following lines of code to build up unlimited levels:
ObservableCollection<Node> nodes = new ObservableCollection<Node>();
 
nodes.Add(new Node("Company"));
nodes[0].Nodes.Add(new Node("Department"));
nodes[0].Nodes[0].Nodes.Add(new Node("here are you"));
nodes[0].Nodes[0].Nodes[0].Nodes.Add(new Node("even deeper"));
 
radTreeView1.ItemsSource = nodes;

Surely this is only valid providing you know the number of levels before runtime?


I guess I'm essentially looking for a generic hierarchy builder where the number of levels are unknown until runtime, i.e. when data is download from database.

Any help would be greatly appreciated.

Thanks for your time.


Ammar
Top achievements
Rank 1
 answered on 11 Dec 2018
1 answer
135 views

Hello,

This big can be reproduced in your demo application:

  1. Open the GridView examples
  2. In the available examples, select "Selection and Usability | Row Details"
  3. Select a rowin the grid view
  4. In the external Details Presenter, select Visible: nothing is displayed in the bottom. You have to select another row and then come back to show the details.

 

Also another problem: if the external details is inside a ContentPresenter (collapsed at the beginning), it can't find  the gridview.

To test this, replace your Border with a ContentPresenter.

Ivan Petrov
Telerik team
 answered on 10 Dec 2018
10 answers
245 views

I am currently using RAD shapes and Text on Rad Diagram Canvas in WPF

I would like to know I can get pixel view for two color Displays, like attached Image [296x128.PNG].

Currently I can see different effects are supported, can you please let me know how can I modify rad diagram canvas  to display two color (Black and White) mode, and also I need to then export it to monochrome bitmap.

Thanks.

 

Martin Ivanov
Telerik team
 answered on 10 Dec 2018
1 answer
88 views

Hello Expertise,

I want to use RadChartView control into my new project WPF.

But problem is that i can't see "RadChartView" into VS 20017 ToolBox. please need assistance.

 

Thanks,

Maksud

Martin Ivanov
Telerik team
 answered on 10 Dec 2018
2 answers
184 views

Hi,

I've got a problem with overlapping RadPanes when using RadDocking Root Compass.

The case is that when I'm dragging RadPanes to the one side of the Root Compass, the Rad Panes on the other side gets overlapped by the dragged ones.
Description may not be clear, so here is simple gif showing the problem:

Pane "Inner Pane C" get overlapped, when dragging new panes to the left side of the Root Compass. It works for every side of the Root Compass.

 

Is there a simple solution for this issue? Ex. modifying the docked Panes width, to fit them all in the RadDocking control? I've searched on this forum and in the documentation, and couldn't find the solution.

 

Best regards,

Mateusz

Dilyan Traykov
Telerik team
 answered on 07 Dec 2018
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?