Telerik Forums
UI for WPF Forum
1 answer
439 views

I have a RadCartesianChart chart with a dynamic number of date/double series.  So, I'm using a ChartSeriesProvider and programmatically generating the CategoricalSeriesDescriptor instances for the series.  The x values for the data are of type DateTime, but the query results are actually grouped by the actual query already so that they are per year, month, etc.  So, if the query was grouped by month, I would have a single point to plot where the Datetime value is on the first of the month.  For most groupings, I can use the axis.LabelFormat property to provide an x axis label that is appropriate to the grouping.  Ex. for month, I'd provide something like "MMM, yyyy". However, there is no format specifier for week number (of the year) or quarter number for me to generate labels like "Week 12, 2013".  Is there a way for me to generate that kind of label? Maybe some other method besides using Axis.LabelFormat?


Thanks - Mitch

Peshito
Telerik team
 answered on 17 Dec 2013
12 answers
758 views

I think I've seen this problem before, but none had a documented resolution.  I have a list of objects from the database that I want to display in a property grid.  The tables and view have been built to provide all that I need for the property grid.  Here is the poco def:

public class Setting

{

public string ParameterName { get; set; }

public string ParameterValue { get; set; }

public string DataTypeName { get; set; }

public string ParameterTypeName { get; set; }

public string Description { get; set; }

}

I am trying it in code behind first, so my xaml is simple:

<telerik:RadPropertyGrid x:Name="_propertyGrid" AutoGeneratePropertyDefinitions="False" />

and the code-behind gets the list of Setting instances from the view model and wraps a PropertyDefinition around it.  It adds that PropertyDefinition to the property grid, then binds the property grid to the entire list:

List<Setting> settings = viewModel.Settings;

foreach (Setting setting in settings)

{

_propertyGrid.PropertyDefinitions.Add(new PropertyDefinition(/*new ItemPropertyInfo(setting.ParameterName, Type.GetType(setting.DataTypeName), setting.Description)*/)

{

 Binding = new Binding("ParameterValue") { Mode = BindingMode.TwoWay /*, Path = new PropertyPath("ParameterValue")*/ },

 

 Description = setting.Description,

 DisplayName = setting.ParameterName,

 GroupName = setting.ParameterTypeName,

});

}

_propertyGrid.Item = settings;

 

This works perfectly in some ways: every instance gets a row in the grid; and the DisplayName, Description, and GroupName all match the poco from whence it came.

However, I cannot get the ParameterValue to display.  I know it is set because I can set DisplayName or Description to setting.ParameterValue and the actual value shows in the name or description, but never in the bound data.

I look at my output window and get no binding errors.  However I get no errors even if I intentionally misspell the ParameterValue property's name, so I don't think that is conclusive.

 

The commented out code is stuff I've tried that either generates a runtime error (new ItemPropertyInfo), or has no effect (new PropertyPath). Both seem interesting though, so I left them in for exploration.

So my question is, can I bind the value of a property grid to a specific property of a poco in a list of them, as I can bind things like Description, DisplayName and GroupName?

Thank you very much for your time on this.

 
Edit: Somebody else commented in another post that it works if PropertySetMode is set to None, so I added this:

_propertyGrid.PropertySetMode = PropertySetOperation.None;

with no effect.  However, if I set to to Union or Intersection, the *GroupName* (not the value, but the category) shows up in the data.  How is that possible?

Dimitrina
Telerik team
 answered on 17 Dec 2013
5 answers
229 views
Hallo,
we have a new issue with RadTabControl - when we use style selector to use RadTabControl in MVVM concept, after we create more than one TabItems, after each active tab control item change, the View's constructor is everytime called.. - why RadTabControl is creating everytime new instance??? (-> Click on the button to add any tab items, create breakpoint into constructor UserControl1() and switch between the tabs...)
When we change RadTabControl into TabControl (remove all Telerik's stuff from MainWindow.xaml), the problem is solved... Thank you for your help...
Joel
Top achievements
Rank 1
Iron
 answered on 17 Dec 2013
3 answers
193 views
I have a DataTable bound to a RadGridView. I wish to display data errors for all rows on load.

When I create my DataTable I validate it, and if a cell has an error I call the following:

row.SetColumnError(1, "This cell has an error");

I can't get this to show up in the grid. How can I do this with a DataTable?

Thanks
Yoan
Telerik team
 answered on 16 Dec 2013
1 answer
188 views
We have a RadGridView that's data-bound to a DataView (via ItemsSource). The DataTable can have 1 million records or more and we're sometimes experiencing out-of-memory errors, and memory never seems to be freed. Typical column count for our grid is anywhere from 10 or so to maybe 20+. The more columns, the worse, of course.

The grid is on a WPF UserControl that's hosted inside a WinForms form, in case that makes a difference, and it's set up to auto-generate columns because it's designed to show practically any kind of data from the database that the user wants to query. We have column and row virtualization enabled, and we're using the lightweight templates (which we recently implemented because they're faster).

We really have 2 problems:

1. Memory usage versus the standard .NET data view control. Are there any known issues with excessive memory usage?

2. Memory never seems to be released, even after disposing the DataTable, setting references to null, removing the grid from its parent, disposing the disposables, and other things we've tried. This hurts because even if each of the user's query returns less than a million rows, it adds up over time and the grid doesn't seem to release memory for what was there before.

Thanks for any help.
Dimitrina
Telerik team
 answered on 16 Dec 2013
0 answers
88 views
Hi,

We are using schedule view to display list of appointments in the range of 1 year with 1500 schedules.

We need to show some of the text in the subject as bold. For that, we are using Run control inside appointment template.
This implementation makes scroll navigation very slow.
Pls let me know the solution or any alternate way for implementing this.


- Sugumar P
Sugumar
Top achievements
Rank 1
 asked on 16 Dec 2013
1 answer
86 views
Hello,
that's now 10 days that the Q3 2013 SP1 version is out, but the offline CHM file still refers to the Q3 2013 version.
It's really a recurrent problem and I had to regularly ask for offline documentation update (for Silverlight and WPF), so please keep it current when a new version is out.
Patrick
Yana
Telerik team
 answered on 16 Dec 2013
3 answers
216 views
I update data in GridView very quickly. Last updated item have a state as if mouse over it.

So when I select item, it is high probability to select wrong item (item, which was last updated), instead of item mouse actually over.

 You can reproduce this problem in demo: GridView -> Real-time Update.

What should I do to solve this problem?


Dimitrina
Telerik team
 answered on 16 Dec 2013
3 answers
805 views
Hi,

I'm having trouble with the logic in my code where the PreviewKeyDown Event is firing multiple times before the KeyUp Event is triggered.

For example:
I press two keys very quickly but NOT at the exact same time. However, my KeyUp event has some logic that needs to be completed in time before the next PreviewKeyDown should be fired.

Is there a way that I can prevent a PreviewKeyDown event from firing again until the respective KeyUp event has finished?
I suppose one solution would be to programmatically Add and Remove the events. I just wondered if there was a flag I can use to check instead.


You can see from my Debug output below that the PreviewKeyDown is firing twice before the KeyUp events have finished:
key press: N
Update Modification - PreviewKeyDown Event (Is Selection Empty: False)
key press: A
Update Modification - PreviewKeyDown Event (Is Selection Empty: False)
KeyUp Event Fired
KeyUp Event Fired


Many thanks,

Rob
Petya
Telerik team
 answered on 16 Dec 2013
3 answers
726 views
Hello, I have a RadGridView that has potentially thousands of rows and 30-50 columns. The vertical scrolling works great even with 150,000+ rows. However, the horizontal scrolling is very slow and jerky. Also the scroll bar starts off about half the width of the GridView and then shrinks as you scroll to the right. This makes the cursor move off the scroll bar. I've tried changing a few settings, but so far nothing has made any difference.

I am using auto generated columns because I don't know until run-time what columns will be in the grid.

Thanks,
Curtis
Dimitrina
Telerik team
 answered on 16 Dec 2013
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?