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

I need to maintain scroll position (both horizontal and vertical) when moving across pages.
I tried the following code , but was unable to achieve the desired functionality.
Even after calling RestoreScrollPosition() the scrollviewer didn't change its position.




private void btnNext_Click(object sender, RoutedEventArgs e)



{

SetScrollPosition();
BindData();

RestoreScrollPosition();







}







private void SetScrollPosition()



{



GridViewScrollViewer svSummaryInfo = (GridViewScrollViewer)rtSummaryInfo.FindChildByType<GridViewScrollViewer>();








_dbVerticalOffset = svSummaryInfo.VerticalOffset;
_dbHorizontalOffset = svSummaryInfo.HorizontalOffset;
}




private



void RestoreScrollPosition()



{


GridViewScrollViewer



svSummaryInfo = (GridViewScrollViewer)rtSummaryInfo.FindChildByType<GridViewScrollViewer>();





if (svSummaryInfo != null)



{



svSummaryInfo.ScrollToHorizontalOffset(_dbHorizontalOffset);

svSummaryInfo.ScrollToVerticalOffset(_dbVerticalOffset);

}
}

Please provide a code snippet for the same.
Nedyalko Nikolov
Telerik team
 answered on 08 Dec 2011
0 answers
139 views
Hi Team,
I am using radDatafilter with custom inputs (date picker, combobox, checkbox), but i am unable to fire events when Input data changes. For example if user input is check box, then no event fire, similarly no event for  combobox selection change, i cant catch any event. kindly guide me raddatafilter event.
I posted some threads earlier, kindly consider that. Urgent response is highly appreciated.
Kamran
Top achievements
Rank 3
Iron
Iron
Veteran
 asked on 08 Dec 2011
5 answers
554 views
I'm trying to figure out a good way to get a theme applied at design time. I followed someones suggestion to create a class like this and added it to the resources in my App.xaml.
public class TelerikThemeManager : DependencyObject
{
    public TelerikThemeManager()
    {
        StyleManager.ApplicationTheme = new MetroTheme();
    }
}

I'm getting this error with RadExpander when i have that in place. The (few) other controls seem to be fine. Is there a good way of getting design time theme support application wide?

Cannot freeze this Storyboard timeline tree for use across threads.
   at System.Windows.Media.Animation.BeginStoryboard.Seal()
   at System.Windows.TriggerAction.Seal(TriggerBase containingTrigger)
   at System.Windows.TriggerActionCollection.Seal(TriggerBase containingTrigger)
   at System.Windows.TriggerBase.Seal()
   at System.Windows.Trigger.Seal()
   at System.Windows.TriggerCollection.Seal()
   at System.Windows.StyleHelper.SealTemplate(FrameworkTemplate frameworkTemplate, Boolean& isSealed, FrameworkElementFactory templateRoot, TriggerCollection triggers, ResourceDictionary resources, HybridDictionary childIndexFromChildID, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& containerDependents, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& triggerActions, HybridDictionary& dataTriggerRecordFromBinding, Boolean& hasInstanceValues, EventHandlersStore& eventHandlersStore)
   at System.Windows.FrameworkTemplate.Seal()
   at System.Windows.FrameworkTemplate.System.Windows.ISealable.Seal()
   at System.Windows.StyleHelper.SealIfSealable(Object value)
   at System.Windows.ResourceDictionary.SealValue(Object value)
   at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource)
   at System.Windows.DependencyPropertyChangedEventArgs.get_NewValue()
   at System.Windows.Controls.Control.OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents)
   at System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style style)
   at System.Windows.StyleHelper.UpdateThemeStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style& themeStyleCache)
   at System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject d, Object oldValue, Object newValue)
   at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
   at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
   at System.Windows.FrameworkElement.OnThemeStyleKeyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadExpander.SetDefaultStyleKey() in c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Expander\RadExpander.cs:line 577
   at Telerik.Windows.Controls.RadExpander.OnInitialized(EventArgs e) in c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Expander\RadExpander.cs:line 571
   at System.Windows.FrameworkElement.TryFireInitialized()
   at System.Windows.FrameworkElement.EndInit()
   at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.EndInit(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode, ISupportInitialize supportInitialize)
   at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateProperties(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode)
   at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
   at Microsoft.Expression.Platform.WPF.InstanceBuilders.FrameworkElementInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
   at MS.Internal.Services.DesignModeValueProviderService.DesignModeValueProviderBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
   at Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)

Rayne
Top achievements
Rank 1
 answered on 07 Dec 2011
8 answers
259 views
HI there,
I have a WPF application with MVVM. My main view has a RadDocking with multiple documents (MDI). The RadPanes are implicitly created through a coupling of the ViewModel with the RadDocking (I use the RadPaneGroupExtension from another forum post).
My RadDocking looks like this:

<Controls:RadDocking.DocumentHost>
    <Controls:RadSplitContainer>
        <Controls:RadPaneGroup Name="OpenEntities" local:PaneGroupExtensions.ItemsSource="{Binding OpenDocs}">
            <local:PaneGroupExtensions.ItemContentTemplate>
                <DataTemplate DataType="{x:Type ReferenceViewModels:DepartmentViewModel}">
                    <views:DepartmentView />
                </DataTemplate>
            </local:PaneGroupExtensions.ItemContentTemplate>
DepartmentView contains some Textboxes.
Unfortunately, the TextBoxes are readonly if instantiated this way. If I place the DepartmentView at another place (e.g. in a hardcoded RadPane in the above code), it works.

Since I have no clue where to search is any hint appreciated.

Regards

Mat
Ivo
Telerik team
 answered on 07 Dec 2011
1 answer
102 views
I Have an asset with with a name, that contains  a value for each day (in  7 days)
List <ChartData>list = xData.GetData(DateTime.FromOADate(40839), DateTime.FromOADate(40846),  assetName);
so here i am saving for each asset the day, the name and the value it has on that day

no i want to make a stackedbar, where the value for each asset is given on day 12/1/2011, so i want all assets like
xbox, telephone, tv, .. give a value in a stackedbar for 12/1/2011 in the stackedbar chart.

How can i do this, 

this is what i tried

List<ChartTot> data = new List<ChartTot>();
 
XMLData xData = new XMLData();
XMLData xData2 = new XMLData();
 
data.Add(new ChartTot(xData.GetData(DateTime.FromOADate(40839), DateTime.FromOADate(40846), "Stereo")));
data.Add(new ChartTot(xData2.GetData(DateTime.FromOADate(40839), DateTime.FromOADate(40846), "Gas")));
 
radChart1.ItemsSource = data;
public class ChartTot
   {
       private List<ChartData> cd = new List<ChartData>();
 
       public ChartTot(List<ChartData> list)
       {
           this.cd = list;
       }
   }
public class ChartData
  {
      public String Naam { get; set; }
      public double Waarde { get; set; }
      public DateTime DezeW { get; set; }
 
 
 
      public ChartData()
      {
      }
}
 

(xData.GetData(DateTime.FromOADate(40839), DateTime.FromOADate(40846), "Stereo")
this gives me a list from ChartData class, and i put it in a List of ChartTot.

the itemsSource contains a list (ChartTot) that contains a list of ChartData

But i get no chart ???
Petar Marchev
Telerik team
 answered on 07 Dec 2011
4 answers
204 views
Hi Team,

I was going through your documnet described in this blog post here. (Export to PDF in Help for Rad Chart)

Here when a chart we need to export is not in visual tree, we create a new RadChart and add the series mapping to it and export it.
But in my case I'm not using the DefaultView of RadChart, because I need to have a grid inside my chart area. So the modified RadChart I created in Xaml and using the same.
Now what I'm trying to do is I'm assigning the DataSeries to the chart I have in xaml (not creating a new one as in your example), and creating my chart. Now when I try to export it using ExportToImage, it throws an exception of null reference.

Is it not possible to export the chart which I have an updated view in xaml, when its not visible in the UI, by assigning the DataSeries as explained in your example (ex: not visible in visual tree)?

Please reply soon.

Thanks.

Manishkumar
Top achievements
Rank 1
 answered on 07 Dec 2011
1 answer
88 views
I've been struggling to create a stacked bar chart with that will display the following data:



I realize that since the columns (years) are dynamic that i must create the chart in codebehind. However, I've been lost with trying to figure out how to loop through the data (in the form of a datatable, that looks exactly like the grid in the screenshot above) and what item mappings and/or groupsettings to specifiy.  Any help with figuring this out would be most appreciated! Thanks

Tsvetie
Telerik team
 answered on 07 Dec 2011
0 answers
83 views
Hi,
I have a Rad TreeListView having 6 level of data. Suppose i expand the nodes to any lower level say 20 nodes expanded. Now i click on Navigation button to go to next page. My requirement is user will be able to see the same record before pagination.
In my treelistview row Virtualization is enabled.

Please attach a code snippet if any

Thanks
Vinod
Top achievements
Rank 1
 asked on 07 Dec 2011
1 answer
351 views
Hi,

I have a user control with RadGridView bound to the database table.

The table has a DateTimeOffset column.

It seems that the filter doesnt function properly with this DateTimeOffset datatype (the Date time picker in the filter window of the Grid View Column filter doesnt show up, and the options for filtering is constricted to only isEqualTo and IsNotEqualTo. Other options are not available).

I tried binding the columns with DateTime datatype where ever I could bind the grid to a Object (or Property) which is in turn bound to the database column.

But, where ever I need a direct binding to the database, I am not able to do this.

Can you please suggest any alternate solution?

Thanks and regards

Pavan
Rossen Hristov
Telerik team
 answered on 07 Dec 2011
2 answers
135 views
Hello Telerik Team,
                              I have one clarification about radcombobox..
I have two objects like LedgerID and LedgerName.The values are stored in database.I want to  retrieve these details and add to radcombobox itemsource value..

then if i put letter A in radcombobox  after drop down will open with all A starting words in assending order...
and if suppose i put Number in radcombobox  then the values will display ascending order based on the given LedgerID..

How to add radcombobox Itemsource to two columns and the above filtering method?
is it possible with Radcombobox?
or how to achive this give me any suggesstions?
Yana
Telerik team
 answered on 07 Dec 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?