Telerik Forums
UI for WPF Forum
1 answer
120 views
Hi,

I saw this text on a Tips and Tricks page (http://www.telerik.com/help/silverlight/radgridview-performance-tips-tricks.html):

Try not to place RadGridView in controls/panels which will measure it with infinity. For example, ScrollViewer, StackPanel and Grid with Row.Height=Auto or Column.Width=Auto will measure with infinity. If RadGridView is measured with infinity the virtualization turns off. Also setting RadGridView.ColumnWidth to a specific width (like 100) will increase both horizontal & vertical scrolling performance. Auto is a little bit slower and Star is the slowest (most noticeable when you have a lot of columns).

What I normally do, is this:

<Grid>
  <Grid.RowDefinitions>
            <RowDefinition Height="Auto " />
            <RowDefinition Height="*" />
          <RowDefinition Height="Auto " />
          </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

 
<Custom ToolBar Grid.Row="0" />
  <RadGridView Grid.Row="1"  />
 <StatusBar Grid.Row="2" />
</Grid>

But it seems that the tip-and-trick above tells me that this is a bad idea when it comes to performance.
But I am bit at a loss on what to do, then. I want the GridView how have only the available space. If I cannot use the stackpanel or grid, then how? Dockpanel?

I've googled a lot of answers to problems with infinity, but has been unable to spot a solution without Auto or Star.. Seems like everyone knows how to fix it without having it spelled out..  like me :-) ... Help will be appreciated!
Hristo
Telerik team
 answered on 17 Mar 2014
3 answers
317 views
I have a two columns with buttons in them:
public class GridViewButtonColumn : Telerik.Windows.Controls.GridViewColumn

Based on the data in the row, I need to enable or disable one of those two buttons.  So, I have a Boolean value on the row but I haven't figured out how to use that value to bind the IsEnabled property of the button. 

Appreciate your help,
Joel

PS.  A code example is always welcome.

public class GridViewButtonColumn : Telerik.Windows.Controls.GridViewColumn
    {
        public event ActionRequest ActionRequestEvent;
 
        private System.Drawing.Bitmap _image = null;
 
        public System.Drawing.Bitmap Image
        {
            get
            {
                return _image;
            }
            set
            {
                if (_image != value)
                {
                    _image = value;
                }
            }
        }
         
        public GridViewButtonColumn()
        {
        }
 
        public GridViewButtonColumn(
            System.Drawing.Bitmap image)
        {
            Image = image;
        }
        /// <summary>
        /// WPF RadGridView Custom Column - Capture & Set Control Properties
        /// </summary>
        /// <param name="cell"></param>
        /// <param name="dataItem"></param>
        /// <returns></returns>
        public override FrameworkElement CreateCellElement(
            GridViewCell cell,
            object dataItem)
        {
            RadButton btn = new RadButton()
            {
                Content = new Image()
                {
                    Source = ImageHelper.LoadBitmap(Image)
                }
            };
            btn.Click += btn_Click;
            return btn;
        }
 
        void btn_Click(
            object sender,
            RoutedEventArgs e)
        {
            try
            {
                ExceptionHelper.TestNull(ActionRequestEvent, "Button Click Event Handler");
 
                Button btn = sender as Button;
                RadGridView grid = btn.ParentOfType<RadGridView>();
                 
                ActionRequestEvent(sender,
                    new ActionRequestEventArgs(
                        new ContextItem()
                        {
                            Control = grid.GetType(),
                            Action = ProcessAction.Start,
                        })
                    {
                        Data = btn.DataContext,
                        Sender = grid
                    });
            }
            catch (Exception ex)
            {
                exceptionHandler(ex);
            }
        }

Nick
Telerik team
 answered on 17 Mar 2014
1 answer
447 views
I would like to highlight items in my charts when a user moves the mouse over them. For example, placing a border around a bar on a bar series or changing the color of a data point on a line series. When the user moves the mouse off of the item then it would return to it's normal appearance. Does anyone know how I can achieve this?
Martin Ivanov
Telerik team
 answered on 17 Mar 2014
4 answers
127 views
Hi,

I have a RadMap with many ellipse (created from EllipseData) and I would like to display text beside the left border of these ellipse.
I have been able to do something like this with a MapEllipseGeometry (that have a CaptionLocation) in an InformationLayer, but I wonder if it's possible to do this with ShapeData in VisualizationLayer.

Thank you!

Andrey
Telerik team
 answered on 17 Mar 2014
1 answer
197 views
When using the RadRibbonWindow in combination with RadRibbonView, I have an odd problem with the position of the quick access toolbar, and the title/application name. For some reason they become positioned below the title bar. See attached screen shots.

From my tests it appears, that the problem is only present when the property IsBackstageOpen is binded, and the property CollapseThresholdSize is
set. Removing CollapseThresholdSize solves the problem?

I can recreate the problem using this XAML:

<telerik:RadRibbonWindow x:Class="TelerikRibbon.MainWindow"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonView"
        xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
       Title="Window title should not be displayed"
>
    <Grid>
        <telerik:RadRibbonView Title="RibbonView Title" ApplicationName="My Application" IsBackstageOpen="{Binding ShowBackStage}" CollapseThresholdSize="100,100" VerticalAlignment="Top"  ApplicationButtonContent="Fil" >
 
 
            <telerik:RadRibbonView.QuickAccessToolBar>
                <telerik:QuickAccessToolBar CustomizationMenuVisibility="Collapsed">
                    <telerik:RadRibbonButton Text="Open" SmallImage="/Images/Icons/open.png" Size="Small" />
                </telerik:QuickAccessToolBar>
            </telerik:RadRibbonView.QuickAccessToolBar>
 
            <!-- Backstage section-->
            <telerik:RadRibbonView.Backstage>
                <telerik:RadRibbonBackstage>
                    <!-- Save-->
                    <telerik:RadRibbonBackstageItem Header="Click here to save" Icon="/Images/Icons/save.png" CloseOnClick="True" IsSelectable="true" />
                </telerik:RadRibbonBackstage>
            </telerik:RadRibbonView.Backstage>
 
            <telerik:RadRibbonTab Header="Home">
                <telerik:RadRibbonGroup Header="Clipboard">
                    <telerik:RadRibbonSplitButton
                                                  Size="Large"
                                                  Text="Paste"
                                                  telerik:ScreenTip.Description="Paste the contents the Clipboard."
                                                  telerik:ScreenTip.Title="Paste(Ctrl+V)">
                        <telerik:RadRibbonSplitButton.DropDownContent>
                            <controls:RadContextMenu BorderThickness="0">
                                <controls:RadMenuItem Header="Paste" />
                                <controls:RadMenuItem Header="Paste Form" />
                            </controls:RadContextMenu>
                        </telerik:RadRibbonSplitButton.DropDownContent>
                    </telerik:RadRibbonSplitButton>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="View" />
        </telerik:RadRibbonView>
    </Grid>
</telerik:RadRibbonWindow>


Tina Stancheva
Telerik team
 answered on 17 Mar 2014
1 answer
119 views
Hi!

What is the best way to sort the children of a certain node?
Yoan
Telerik team
 answered on 17 Mar 2014
1 answer
156 views
Hi All,

Here "ItemCollection"  having 2 items.I am ssigning one  item to RadTreeViewItem as shown bellow.

Inside i am calling same method and assigning RadTreeViewItem(Insted of ItemCollection), if i call like this i am getting error "Can not convert type RadTreeViewItem  to ItemCollection "


BuildConfigDetailsData_Helper(ItemCollection ndcol, ref string strConfigDetailsData)
        {
            string strImagesPath = "file:///" + _Params.SizerFolderName + "xml\\";
            RadTreeViewItem nd;
            for (int iCount = 0; iCount < ndcol.Count; iCount++)
            {
                nd = (RadTreeViewItem)ndcol[iCount];

   BuildConfigDetailsData_Helper((ItemCollection)nd, ref strConfigDetailsData);


Please help me how can i proceed..........................
Petar Mladenov
Telerik team
 answered on 17 Mar 2014
2 answers
189 views
Hi 

Is there some way by which we can get the points on a RadDiagramShape. 
Currently we see that the RadDiagramShape has Geometry property. Is there some way to get a PointCollection from the shape.
eg Is it possible to get the four points of a rectangle represented by  RadDiagramShape.

Regards
Jeevan
Jeevan
Top achievements
Rank 1
 answered on 17 Mar 2014
2 answers
150 views
Hi,

the ColorEditor ist running fine, but is it possible to save the "new" colored pic as new Image?

Thanks
regards
ww
Arron
Top achievements
Rank 1
 answered on 17 Mar 2014
3 answers
505 views
Something is wrong with my event handling. Trying to throw a few events like KeyDown, SelectionChanged, and most importantly a notification that a Pan or Zoom has occurred via ChartPanAndZoomBehavior_Changed event handler.

Here is a XAML snippet, what is going on? Thanks in advance?

<telerik:RadCartesianChart Grid.Row="2" Name="chart2" Palette="Arctic" KeyDown="chart2_KeyDown" IsHitTestVisible="True" DragOver="chart2_DragOver"   >
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartSelectionBehavior SelectionChanged="chart2_SelectionChanged">
                </telerik:ChartSelectionBehavior>
                
                <telerik:ChartTrackBallBehavior ShowTrackInfo="True" SnapMode="AllClosePoints" ShowIntersectionPoints="True">
                </telerik:ChartTrackBallBehavior>
                <telerik:ChartSelectionBehavior DataPointSelectionMode="Single" ></telerik:ChartSelectionBehavior>
                <telerik:ChartPanAndZoomBehavior  PanMode="Horizontal" ZoomMode="Horizontal" Changed="ChartPanAndZoomBehavior_Changed">
                </telerik:ChartPanAndZoomBehavior>
            </telerik:RadCartesianChart.Behaviors>
Boris
Telerik team
 answered on 14 Mar 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
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?