Telerik Forums
UI for WPF Forum
2 answers
189 views
Is there any way to display Rad TreeView with ItemsOptionListType as CheckList and that particular TreeView should be a Read only kind of...???


Simply my requirement is to display Read only TreeView with checkbox's (not with Disabled mode)



Balaji
Top achievements
Rank 1
 answered on 26 Sep 2011
1 answer
120 views
I would like to persist the state and position of my Tileview to Isolated Storage, but am not sure of the best approach for this?

Can you steer me in the right direction?

Many Thanks

Greg
Alex Fidanov
Telerik team
 answered on 26 Sep 2011
1 answer
179 views
Hi,

I have a WPF radgridview, on a particular event (say button click) I want to change the selection on the grid to a different row based on some parameters. The grid is bound to a datatableview. I am setting it as

grid.SelectedItem = ((

 

DataView)grid.ItemsSource).Table.Rows[count];

 

 

grid.CurrentItem = ((

 

DataView)grid.ItemsSource).Table.Rows[count];

 

 

grid.BringIndexIntoView(count);


where count is the index of the row I want to select. Can you please tell me how to do it.
Pavel Pavlov
Telerik team
 answered on 26 Sep 2011
1 answer
172 views
Good morning
As the title say, RadDragAndDropManager dont fire the DropQuery and DragQuery events.
in XAML:

                dragDrop:RadDragAndDropManager.DropQuery="rTreeListView_DropQuery"
                dragDrop:RadDragAndDropManager.DropInfo="rTreeListView_DropInfo"
                dragDrop:RadDragAndDropManager.DragQuery="rTreeListView_DragQuery"
                dragDrop:RadDragAndDropManager.DragInfo="rTreeListView_DragInfo" 
 
and, in code behind, there is the implementation of events.
Setting a breakpoint into the events, it's never hit.
Need the DropQuery event because, in my application, there are rules that allow or not 
the drop of an element under another element;
and (as i read from help) i would like to set the QueryResult to false, cancelling drop.
The second question is:
I would like to show an icon (like denial of access)  when the DragCueItem is on an item 
on which drop operation is not allowed.
 



Dimitrina
Telerik team
 answered on 26 Sep 2011
1 answer
146 views
Hi,

Assembly version :2011.2.823.40

I've got a weird issue on telerik radgridview:
i create and destroy columns on view code behind by the code :
myGrid.Columns.RemoveAt(i);
...
myGrid.Columns.Add(NewColumns);

when i rebind my grid, the new column is systematiquely at the place of the removed column but the header is wrong, the new header is at the end of the grid.

is someone had the issue before and know how to resolve that?

thanks by advance
Vera
Telerik team
 answered on 26 Sep 2011
3 answers
136 views
Is there any way to get or set the HighlightedElement with the RadComboBox?  The HighlightedElement seems to follow the SelectedItem when there is a SelectedItem, but the highlight does not go away when SelectedItem is null.

Thanks.
Valeri Hristov
Telerik team
 answered on 26 Sep 2011
4 answers
259 views
I'm wondering if anybody has done any work extending DataFilter to handle dealing with child collections in a complicated manner. For instance, I have an IParent interface, which has an IEnumerable<IChild> Children member. I'd like to be able to express visually:

from p in parents where p.Children.Any(i => i.Type == 1 && i.Foo = "Bar")

Basically, I want to select parents based on whether any children exists.

I have this notion that I could implement this entirely on my own... somehow. Perhaps a custom 3-part editor control for teh Children property, with a "any" operator... and a sub-RadDataFilter rendered in part-3.

That seems pretty kludgy though.
Rossen Hristov
Telerik team
 answered on 26 Sep 2011
1 answer
112 views
Hi Support
I was able to bind combo according to this thread http://www.telerik.com/help/silverlight/raddatafilter-how-to-create-custom-filter-editors.html
but i don't know how to bind it to special value and Description, is there any idea?
<DataTemplate x:Key="ComboKind">

<telerik:RadComboBox DisplayMemberPath="Dsc"

                     SelectedValue="{Binding Value, Mode=TwoWay, FallbackValue=null}"/>

 

</DataTemplate>


P.S. Item Source contain ID and Dsc

Thanks in advance 
Mehri
Rossen Hristov
Telerik team
 answered on 26 Sep 2011
2 answers
395 views
Hi,

I have an issue about the scroll on my gridview.
My gridview contains a lot of data so there is vertical scrollbars and I set the insert row to visible.
The problem is when I enter data on the insert row and I press enter the gridview don't scroll to the the added row.
Here is my gridview:
<telerik:RadGridView telerik:StyleManager.Theme="Office_Blue"  Width="auto" Height="200"  x:Name="rgvTest"
    ItemsSource="{Binding TrckTest, IsAsync=True}"
    DataLoadMode="Asynchronous"
    SelectionMode="Extended"
    AutoGenerateColumns="False"
    ScrollMode="Deferred"
    EnableRowVirtualization="True"
    SnapsToDevicePixels="True"
    UseLayoutRounding="True"
    ActionOnLostFocus="None"
    ShowInsertRow="{Binding IsReadOnly}"
    CanUserInsertRows="{Binding IsReadOnly}"
    CanUserDeleteRows="{Binding IsReadOnly}"
    Grid.Column="0" RowEditEnded="rgvTest_RowEditEnded">
 
    <i:Interaction.Triggers>
    <i:EventTrigger EventName="RowEditEnded">
    <Commanding:EventToCommand Command="{Binding TestEditEndedCommand}" PassEventArgsToCommand="True"/>
    </i:EventTrigger>
 
    <i:EventTrigger EventName="AddingNewDataItem">
    <Commanding:EventToCommand Command="{Binding AddNewTestEvent}" PassEventArgsToCommand="True" />
    </i:EventTrigger>
 
    <i:EventTrigger EventName="SelectionChanged">
    <Commanding:EventToCommand Command="{Binding ItemTestSelectedCommand}" CommandParameter="{Binding ElementName=rgvTest, Mode=OneWay, Path=SelectedItem}"/>
    </i:EventTrigger>
    </i:Interaction.Triggers>
 
    <telerik:RadGridView.Columns>
    ...
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

I tried to use the event RowEditEnded in the code behind to scroll to the position of  the row like this but it didn't work:
private void rgvTest_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
{
        rgvTest.ScrollIntoView(e.Row);
}

Do you any solution about this issue?
Thanks
Hakim
Top achievements
Rank 1
 answered on 26 Sep 2011
8 answers
358 views
Hello all, 

we are having a big problem with radchart performance. I'll explain  an example to illustrate the situation. 

In one part of our app, a user control that contains 5 Radcharts is loaded. Each chart contains two series for a total of 10, and each series has exactly 2880 points in our database. Internally, each chart is set to use a sampling threshold of 200, X axis range is set to DateTime and AutoRange, and zoom settings are set to zoom and scroll. As these are multi-series charts, the schema we used is that found in Telerik's documentation (binding to nested collections), associating each series mapping to one collection index. 

As the user refreshes, one WCF call is asynchronously made to retrieve each series data (thus, 10 calls in total). The call returns really fast, and in around 2 seconds all the lists of points that feed the series are loaded in memory.

The problem arises when updating the charts's ItemsSource property. It takes a lot of time since the ItemsSource of each chart is updated until all the charts are shown in the screen properly (around 15-20 seconds!!). This is totally a mess for us, as our customer needs to change the date queries dinamycally and perform refresh operations frequently. Waiting for 20-25 seconds every time a refresh is made is not acceptable for him. 

Showing point marks, labels and so on is disabled, as well as animations. Please, could you provide any help for this?

I post the chart configuration code here:

// Local variables
            bool bResult = true;
            TimeSpan DateDifference = new TimeSpan();
 
            try
            {
                // Sampling threshold
                this.Chart.SamplingSettings.SamplingThreshold = 200;
                this.Chart.SamplingSettings.SamplingFunction = ChartSamplingFunction.Min;
                 
                // Settings for X axis --> manual setting for min, max, step, label step
                this.Chart.DefaultView.ChartArea.AxisX.IsDateTime = true;
 
                // Note: set to true !!!!
                this.Chart.DefaultView.ChartArea.AxisX.AutoRange = true;
                this.Chart.DefaultView.ChartArea.AxisX.TicksDistance = 15;
 
                // Set the label format depending on the selected timespan
                DateDifference = this.m_dtDateTo.Subtract(this.m_dtDateFrom);
 
                TimeSpan FifteenMinutes = new TimeSpan(0, 15, 0);
                TimeSpan OneDay = new TimeSpan(1, 0, 0, 0);
                TimeSpan OneMonth = new TimeSpan(31, 0, 0, 0);
                TimeSpan OneYear = new TimeSpan(365, 0, 0, 0);
 
                // Less than 15 minutes
                if (DateDifference.TotalMilliseconds < FifteenMinutes.TotalMilliseconds)
                {
                    // Hours, minutes and seconds
                    this.Chart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "HH:mm:ss";
                }
                // Between 15 minutes and 1 day
                else if ((DateDifference.TotalMilliseconds > FifteenMinutes.TotalMilliseconds) && (DateDifference.TotalMilliseconds < OneDay.TotalMilliseconds))
                {
                    // Hours and minutes
                    this.Chart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "HH:mm";
                }
                // Between 1 day and 31 days
                else if ((DateDifference.Days >= OneDay.Days) && (DateDifference.Days <= OneMonth.Days))
                {
                    // Show the day
                    this.Chart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "M-dd";
                     
                    // No auto range... the chart does not handle this properly in some cases
                    this.Chart.DefaultView.ChartArea.AxisX.AutoRange = false;
                    this.Chart.DefaultView.ChartArea.AxisX.MinValue = this.m_dtDateFrom.ToOADate();
                    this.Chart.DefaultView.ChartArea.AxisX.MaxValue = new DateTime(this.m_dtDateTo.Year, this.m_dtDateTo.Month, this.m_dtDateTo.Day, 0, 0, 0).ToOADate();
                    DateTime aux1 = new DateTime(2000, 1, 1, 0, 0, 0);
                    DateTime aux2 = new DateTime(2000, 1, 2, 0, 0, 0);
                    double Step = aux2.ToOADate() - aux1.ToOADate();
                    this.Chart.DefaultView.ChartArea.AxisX.Step = Step;
                    this.Chart.DefaultView.ChartArea.AxisX.LabelStep = 1;
                }
                else if ((DateDifference.TotalMilliseconds > OneMonth.TotalMilliseconds) && (DateDifference.TotalMilliseconds <= OneYear.TotalMilliseconds))
                {
                    // Month and year
                    this.Chart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "yyyy-M";
                }
                else if (DateDifference.TotalMilliseconds > OneYear.TotalMilliseconds)
                {
                    // Year value
                    this.Chart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "yyyy";
                }
 
                // Label orientation
                this.Chart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45;
                this.Chart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Auto;
 
                // Disable animations
                this.Chart.DefaultView.ChartArea.EnableAnimations = false;
 
                // X Axis label style
                this.Chart.DefaultView.ChartArea.AxisX.AxisStyles.ItemLabelStyle = this.Resources["ItemLabelStyle"] as Style;
 
                // Configuring the Y axis
                this.Chart.DefaultView.ChartArea.AdditionalYAxes.Clear();
 
                // Get the lower Y axis index
                this.m_iLowerAxisIndex = (from axis in this.m_obcAxisY
                                          select axis.ID).Min();
                
 
                foreach (DLL_CustomControls.ReportChartSettings.AxisY obConfiguredAxisY in this.m_obcAxisY)
                {
                    if (obConfiguredAxisY.ID == this.m_iLowerAxisIndex)
                    {
                        // Configuration for the default axis
                        this.Chart.DefaultView.ChartArea.AxisY.MinValue = obConfiguredAxisY.MinValue;
                        this.Chart.DefaultView.ChartArea.AxisY.MaxValue = obConfiguredAxisY.MaxValue;
                        this.Chart.DefaultView.ChartArea.AxisY.AutoRange = obConfiguredAxisY.AutoRange;
                        this.Chart.DefaultView.ChartArea.AxisY.Title = obConfiguredAxisY.Label;
                        continue;
                    }
 
                    // Create and add new axis
                    Telerik.Windows.Controls.Charting.AxisY NewAxis = new Telerik.Windows.Controls.Charting.AxisY();
                    NewAxis.MinValue = obConfiguredAxisY.MinValue;
                    NewAxis.MaxValue = obConfiguredAxisY.MaxValue;
                    NewAxis.AutoRange = obConfiguredAxisY.AutoRange;
                    NewAxis.AxisName = obConfiguredAxisY.ID.ToString();
                    NewAxis.Title = obConfiguredAxisY.Label;
 
                    // Add the secondary axis
                    this.Chart.DefaultView.ChartArea.AdditionalYAxes.Add(NewAxis);                   
                }
            }
            catch (Exception ex)
            {
                bResult = false;
                ExceptionManager.Write("DLL_CustomControls", "ReportChart", "ConfigureChart", "Exception: " + ex.Message);
            }
 
            return bResult;

And here, the function used to process the result of the asynchronous WCF call. As you can see, we make a local copy of the list returned by the WCF method inserting it in an ObservableCollection and then setting the ObservableCollection as an item of m_lstChartSource, which is a list and the object set as Chart.ItemsSource target. "ProcessChartSerie" makes additional processing regarding the serie (color, item mappings and so on):

// Capture the data
                if (!e.Result)
                {
                    // Debug, warn and return
                    DebugManager.Write(DebugManager.DebugStatus.ERROR, "DLL_CustomControls", "ReportChart", "OnGetDataCompleted", "Error in the web service function for Serie ID = " + e.outSerieID.ToString() + ": " + e.strError);
                    MessageBox.Show("Error getting data for serie " + e.outSerieID.ToString() + ". Please try again.", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
 
                // Capture the serie that has been processed
                DLL_CustomControls.ReportChartSettings.ChartSerie obSerieToProcess = null;
 
                obSerieToProcess = (from series in this.m_obcSeries
                                   where series.ID == e.outSerieID
                                   select series).First();
 
                // Process the serie data
                if (!ProcessSerieData(obSerieToProcess))
                {
                    DebugManager.Write(DebugManager.DebugStatus.ERROR, "DLL_CustomControls", "ReportChart", "OnGetDataCompleted", "Error processing serie number " + e.outSerieID.ToString());
                }
                else
                {
                    // If the list has points, process
                    if (e.lstChartPoints != null)
                    {
                        // Add to list of datasources of the chart
                        ObservableCollection<DLL_Resources.WCF_Clients.ChartValueDateDouble> obcPoints = new ObservableCollection<DLL_Resources.WCF_Clients.ChartValueDateDouble>();
 
                        // Convert in observable collection
                        foreach (DLL_Resources.WCF_Clients.ChartValueDateDouble obPoint in e.lstChartPoints)
                        {
                            DLL_Resources.WCF_Clients.ChartValueDateDouble obNewPoint = new DLL_Resources.WCF_Clients.ChartValueDateDouble();
                            obNewPoint.XValueDateTime = obPoint.XValueDateTime;
                            obNewPoint.XValueDouble = obPoint.XValueDouble;
                            obNewPoint.YValue = obPoint.YValue;
 
                            // Add point
                            obcPoints.Add(obNewPoint);
                        }
 
                        this.m_lstChartSource.Add(obcPoints);
                    }
                }



Bartholomeo Rocca
Top achievements
Rank 1
 answered on 26 Sep 2011
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?