Telerik Forums
UI for WPF Forum
4 answers
275 views
I need a vertical scale to be displayed next to an image that have a moving png image. I've used a Telerik Vertical Gauge and a Linear Scale but my client doesn't want to see the gauge borders. How can I customize the gauge to remove the borders without making the scale disappear? Visibility and opactiy makes everything invisible so that's not going to work! Thank you. Here's my xaml and images of what I need and what I have! I appreciate your help!

                    <telerik:RadVerticalLinearGauge Grid.Row="2"
                                                    Visibility="Visible" 
                                                    Opacity=".65" 
                                                    Foreground="LightBlue" 
                                                    Background="LightBlue"  
                                                    Margin="15,0,162,0" 
                                                    BorderBrush="LightBlue"  
                                                    BorderThickness = "0,0,0,0">
                        <telerik:VerticalLinearScale Max="{Binding MastScaleMax.Value}" 
                                                     MajorTickRelativeWidth="5" 
                                                     ClipToBounds="True" 
                                                     FontWeight="ExtraBold"  
                                                     Min="-10"  
                                                     MajorTicks="{Binding MastScaleMax.Value,Converter={StaticResource MyIncrementCalculatorConverter}}" 
                                                     MinorTicks="5" 
                                                     BorderBrush="LightBlue" BorderThickness="0,0,0,0" Margin="18,-20,15,0" Height="644" VerticalAlignment="Top">
                            <telerik:Marker x:Name="TopDriveMarker" Opacity="0" telerik:ScaleObject.RelativeWidth="0.1*" 
                                            telerik:ScaleObject.RelativeHeight="0.05*" Width="5" Height="5" 
                                            Value="{Binding ElevatorPosition.Value}" 
                                            telerik:ScaleObject.Location="OverCenter" Margin="0,0,0,0">
                            </telerik:Marker>
                        </telerik:VerticalLinearScale>
                    </telerik:RadVerticalLinearGauge>



Richard
Top achievements
Rank 1
 answered on 04 Nov 2014
4 answers
241 views
Hi

I have the same problem as this person: StackOverflow question. If you have a RadGridView inside a TabControl, the grid view will lose its filtering and sorting options when you switch to another tab and back.

Details:
  • .NET 4.0
  • RadControls version:  2011.2.920.40
  • The grid views are bound to ObservableCollections or ICollectionViewSource. The filtering is only performed by clicking on the filter button on the column header. No filtering is performed in code.
  • Everything is implemented using the MVVM pattern.

Regards
Pierre-Andre


Adam
Top achievements
Rank 1
 answered on 04 Nov 2014
3 answers
266 views
When we use the auto-layout functionality in our application our diagram ends up upside down. The code we are using for adding shapes and connectors is below. Any ideas on how to make the layout start with our start block on top and then layout downward. I tried added the End block after the start and that did not fix it. Are there any other layouts we can try?

private void PopulateDiagram()
        {
            processingDiagram.Clear();
 
            RadDiagramShape ppEnd = new RadDiagramShape()
            {
                Content = "End",
                Width = 100,
                Height = 50,
                Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.CloudShape)
            };
            processingDiagram.AddShape(ppEnd);
 
            RadDiagramShape ppStart = new RadDiagramShape()
            {
                ContentTemplate = Resources["PreprocessingStartTemplate"] as DataTemplate,
                Width = 100,
                Height = 50,
                Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.CloudShape)
            };
            processingDiagram.AddShape(ppStart);
 
            foreach (PreprocessorSegment segment in SelectedEngine.PreprocessorSegments)
            {
                RadDiagramShape segmentStart = new RadDiagramShape()
                {
                    Content = segment.Node,
                    Width = 100,
                    Height = 50,
                    Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.EllipseShape)
                };
                processingDiagram.AddShape(segmentStart);
 
                RadDiagramConnection connection = new RadDiagramConnection()
                {
                    Source = ppStart,
                    SourceConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Bottom,
                    Target = segmentStart,
                    TargetConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Top,
                };
                processingDiagram.AddConnection(connection);
 
                List<string> unusedOutputs = new List<string>();
                Dictionary<string, RadDiagramShape> outputShapes = new Dictionary<string, RadDiagramShape>();
                Dictionary<PreprocessorAlgorithmInstance, RadDiagramShape> algShapes = new Dictionary<PreprocessorAlgorithmInstance, RadDiagramShape>();
                foreach (PreprocessorAlgorithmInstance alg in segment.Algorithms)
                {
                    RadDiagramShape algShape = new RadDiagramShape()
                    {
                        Content = alg,
                        ContentTemplate = Resources["PreprocessingAlgorithmInstanceTemplate"] as DataTemplate,
                        Width = 100,
                        Height = 50,
                        Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape)
                    };
 
                    unusedOutputs.Add(alg.Output);
                    outputShapes[alg.Output] = algShape;
                    algShapes[alg] = algShape;
                    processingDiagram.AddShape(algShape);
                }
 
                // Connections from Inputs to Outputs.
                foreach (PreprocessorAlgorithmInstance alg in segment.Algorithms)
                {
                    foreach (string input in alg.Inputs)
                    {
                        if (outputShapes.ContainsKey(input))
                        {
                            RadDiagramConnection cn = new RadDiagramConnection()
                            {
                                Content = input,
                                Source = outputShapes[input],
                                SourceConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Bottom,
                                Target = algShapes[alg],
                                TargetConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Top,
                                TargetCapType = Telerik.Windows.Diagrams.Core.CapType.Arrow1Filled
                            };
                            processingDiagram.AddConnection(cn);
                            unusedOutputs.Remove(input);
                        }
                        else
                        {
                            RadDiagramConnection cn = new RadDiagramConnection()
                            {
                                Content = input,
                                Source = segmentStart,
                                SourceConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Bottom,
                                Target = algShapes[alg],
                                TargetConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Top,
                                TargetCapType = Telerik.Windows.Diagrams.Core.CapType.Arrow1Filled
                            };
                            processingDiagram.AddConnection(cn);
                        }
                    }
                }
 
                foreach (string output in unusedOutputs)
                {
                    RadDiagramConnection cn = new RadDiagramConnection()
                    {
                        Content = output,
                        Source = outputShapes[output],
                        SourceConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Bottom,
                        Target = ppEnd,
                        TargetConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Top,
                        TargetCapType = Telerik.Windows.Diagrams.Core.CapType.Arrow1Filled
                    };
                    processingDiagram.AddConnection(cn);
                }
            }
 
            processingDiagram.Layout();
        }
Peshito
Telerik team
 answered on 04 Nov 2014
3 answers
138 views
Hi all,

I'm doing on RadGridView with a customized toggle button instead of using the default toggle button. I know it's coming with the ChildTableDefination and GridViewTableDefinition by default. So, since I'm using the customized toggle button, can I populate the child from my View Model once I clicked on the customized toggle button from parent? How could I link the toggle button once I clicked to the HierarchyChildTemplate? Thanks is advanced. Hope there's someone could help me.

Best Regards, 
Ng.
Dimitrina
Telerik team
 answered on 03 Nov 2014
2 answers
150 views
I am implementing a grid hierarchy view on my UI. I have used hierarchy child template for this and it has 3 levels layer A, layer B and layer C. Now when I click to expand layer A, it ends up expanding layer B as well.

Is there any way to stop this? I do not want to expand layer B by default. Please suggest few ideas.
Rohan
Top achievements
Rank 1
 answered on 03 Nov 2014
2 answers
170 views
Hello everybody,

I have a probleme with my GanttView when I add event to an event that doesn't have children at beginning, when an InitialExpandBehavior is used to keep event collapsed.
I recreate this bug in a small example you can find here https://drive.google.com/file/d/0Bw_pUE-LqMWVbjZGWHJ5ZlFKX1U/view?usp=sharing
Reproduction in this project :
- at beggining, 2 event are generated : "phase 1" and "phase 2", and an event "evt phase 1" is added to children of "phase 1"
- I have an InitialExpandBehavior which return false in ShouldExpandItemByDefault in order to all items are collapsed
- I Have 2 button : "Add event to phase 1" which add an event in children of "phase 1" and "Add event to phase 2" which add an event in children of "phase 2"
- click on "Add event to phase 1" is OK, the event is added
- click on "Add event to phase 2" is KO, the event is added but the view is not refresh
If I remove the expandBehavior, the two buttons are OK.

Can you investigate ? Have you a workaround if correction is complicated ?

Thanks for your Help

PS : sorry for my english
Julien
Top achievements
Rank 1
 answered on 03 Nov 2014
1 answer
132 views
Hi There,

Can you please guide me how can we localize the text "aA" ?
Please check the attached screenshot for more information.

Thanks in advance,
Regards,
Raj.
Boris
Telerik team
 answered on 03 Nov 2014
1 answer
91 views
Hello everybody,

I have a probleme with my GanttView when I add event to an event that doesn't have children at beginning, when an InitialExpandBehavior is used to keep event collapsed.
I recreate this bug in a small example you can find here https://drive.google.com/file/d/0Bw_pUE-LqMWVbjZGWHJ5ZlFKX1U/view?usp=sharing
Reproduction in this project :
- at beggining, 2 event are generated : "phase 1" and "phase 2", and an event "evt phase 1" is added to children of "phase 1"
- I have an InitialExpandBehavior which return false in ShouldExpandItemByDefault in order to all items are collapsed
- I Have 2 button : "Add event to phase 1" which add an event in children of "phase 1" and "Add event to phase 2" which add an event in children of "phase 2"
- click on "Add event to phase 1" is OK, the event is added
- click on "Add event to phase 2" is KO, the event is added but the view is not refresh
If I remove the expandBehavior, the two buttons are OK.

Can you investigate ? Have you a workaround if correction is complicated ?

Thanks for your Help

PS : sorry for my english
Polya
Telerik team
 answered on 03 Nov 2014
8 answers
271 views
Hi,

I have a RadGridView,it contains various columns.i marked two columns of them IsVisible =  False, on certain condition.
I have another condition, on which one of the invisible columns mark IsVisible = True, But i am not able to get index of recently marked visible column on RowLoaded event.


//This is to hide two columns "Address" and "LastName"
private
void rdbHide_Checked(object sender, RoutedEventArgs e)
       {
           if ((bool)rdbHide.IsChecked)
           {
               dgQueue.Columns["Address"].IsVisible = false;
               dgQueue.Columns["LastName"].IsVisible = false;
           }
          
           dgQueue.Rebind();
       }
      //This is to show "Address" column
       private void rdbShow_Checked(object sender, RoutedEventArgs e)
       {
           if ((bool)rdbShow.IsChecked)
               dgQueue.Columns["Address"].IsVisible = true;
          
          
           dgQueue.Rebind();
       }

On RowLoaded event i am unable to get "Address" column index.
private void dgQueue_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            if (e.DataElement != null)
            {
                GridViewRow GrdRow = e.Row as GridViewRow;
                Emp objEV = e.Row.DataContext as Emp;
 
                if (GrdRow != null)
                {
                    for (int index = 0; index < GrdRow.Cells.Count; index++)
                    {
//Here i am not able to get index of "Address" column, on the bases of Address i want to show and hide Image control inside "PatInfo" column
                        if (GrdRow.Cells[index].Column.UniqueName.Equals("PatInfo"))
                        {
                         
                            Image img = null;
                            img = (Image)GrdRow.Cells[index].Content;
                            if (!string.IsNullOrEmpty(objEV.Address))
                            {
                                if (objEV.Address == "Noida")
                                {
                                    if (img != null) img.Visibility = System.Windows.Visibility.Collapsed;
                                }
                                else
                                {
                                    if (img != null) img.Visibility = System.Windows.Visibility.Visible;
                                }
                            }
                        }
                    }
                }
            }
        }

XAML :
<telerik:RadGridView Name="dgQueue" Grid.Row="0" AutoGenerateColumns="False" RowLoaded="dgQueue_RowLoaded">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Width="*" UniqueName="FirstName"
                                                            DataMemberBinding="{Binding FirstName}"
                                                            Header="FirstName">
 
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="*" UniqueName="LastName"
                                                            DataMemberBinding="{Binding LastName}"
                                                            Header="LastName">
                    </telerik:GridViewDataColumn>
 
                    <telerik:GridViewDataColumn Width="*" UniqueName="Address"
                                                            DataMemberBinding="{Binding Address}"
                                                            Header="Address" />
                    <telerik:GridViewDataColumn Width="*" UniqueName="Mobile"
                                                            DataMemberBinding="{Binding Mobile}"
                                                            Header="Mobile" />
 
                    <telerik:GridViewDataColumn Name="PatInfo" UniqueName="PatInfo" Width="90" Header="Pat Info">
                        <telerik:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Image Name="imgDemo"
                                                   Width="16"
                                                   Height="16"
                                                   ToolTip="Patient Information"
                                                   Source="/WpfDemo;component/Images/magnify3.png"
                                                   />
                            </DataTemplate>
 
                        </telerik:GridViewColumn.CellTemplate>
 
                    </telerik:GridViewDataColumn>
 
                </telerik:RadGridView.Columns>
 
            </telerik:RadGridView>
Dimitrina
Telerik team
 answered on 03 Nov 2014
5 answers
784 views
Hi all,

I wish to use radgridview for my parent data and whenever the specific parent data row have details data inside and it will show up a toggle button beside my first column data name instead of the default column for toggle button while for the parent data row which is not containing details data will be not able to see the toggle button. I know there's something related with gridviewboundcolumnbase in a new class. Could anyone give some idea or provide some sample? It will be great for me to be done this. Thanks in advance.

Best Regards,
Ng
Boris
Telerik team
 answered on 03 Nov 2014
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?