Telerik Forums
UI for WPF Forum
2 answers
136 views
Hi
In order to add some hidden "meta data" to our RadDocuments
we decided to derive the Section class and add

public class EditorSection : Section
    {
        private ObservableCollection<Metadata> _metadata = new ObservableCollection<Metadata>();
        //[XamlSerializable]
        public ObservableCollection<Metadata> Metadata
        {
            get { return _metadata; }
            set { _metadata = value; }
        }
    }


Now we can create documents in XAML such as:
<c:EditorSection>
<c:EditorSection.Metadata>
 <c:Metadata Name="DocumentId" Value="{00000-..-..-..}" />
 <c:Metadata Name="Owner" Value="JohnWSmith" />
</c:EditorSection.Metadata>
<t:Paragraph>
<t:Span Text="Hi">
</t:Span>
</t:Paragraph>
</c:EditorSection>

However when saving the Document with XamlFormatProvider
the Metadata stuff is removed.

When Debugging my metadata class I can see a two instances
are created and the two props are assigned on load.

When I try an add the [XamlSerializable] attribute to my property
and also to the properties of the MetaData class
I get an runtime XamlParseException on loading the document:
Can't convert object of type "System.String" to "ObservableCollection<MyNameSapce.MetaData>"
The line in question is:

Telerik.Windows.Documents.FormatProviders.Xaml.XamlFormatProvider.Import(String input) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Documents\FormatProviders\Xaml\XamlFormatProvider.cs:Line 126.

So it seems the XamlFormatProvider can't deal with the markup properly.
Is there a way to "tell" the XamlFormatprovider how (de)serialize my meta data collection
Do I need to specify a typeconverter or value converter also?

Thanks
Christoph
Top achievements
Rank 1
 answered on 23 Apr 2012
3 answers
163 views
Hi,
In my application, i am trying to view the contents in the gridview in the form of print preview dialog. 
I downloaded code from  http://www.telerik.com/community/code-library/wpf/gridview/radgridview-print-and-print-preview.aspx 
The print preview window showing the grid values.  But at the end of each page, bottom of the line, the last row data was partially cut in one page and remaining in next page. Please find the attached image. 

 Am i missing any settings?

Thanks,
Vinodh
Dimitrina
Telerik team
 answered on 23 Apr 2012
10 answers
244 views
Hi all,

The comboboxcolumn is not showing the info from the linked table:
this is the code snippet I'm using to define the column

column = GridViewComboBoxColumn.new()
column.DataMemberBinding = bind
column.UniqueName = colname
column.IsComboBoxEditable = true
column.ItemsSource = data_table_source.DefaultView
column.DisplayMemberPath = "name"
column.SelectedValueMemberPath = "id"
# add the column to the datagrid
raddatagrid.Columns.Add(column)

I can edit the column and the combobox appears populated in full, but as soon as I select an item the view doesn't show the result.

Any suggestions?

I'm using IronRuby, I can make it work as expected with the WPF .net 4.0 DataGrid without any problem.

Regards

Eduardo
Dimitrina
Telerik team
 answered on 23 Apr 2012
6 answers
312 views
Hello.

I have a RadGridView. And a fake element below. I want to bind AlternativeRowBackground to fake element Background property. And I want to do so in AlternativeRowStyle (because in code-behind this style is upgraded with other triggers, that change Background property due to some logic) and not in AlternativeRowBackground property.
 
Is it possible to do so somehow? 

<telerik:RadGridView ItemsSource="{Binding Data}" AlternationCount="2">
    <telerik:RadGridView.AlternateRowStyle>
        <Style TargetType="telerik:GridViewRow">
            <Setter Property="Background" Value="{Binding ElementName=FakeButton, Path=Background}"/>
        </Style>
    </telerik:RadGridView.AlternateRowStyle>
</telerik:RadGridView>
<Button x:Name="FakeButton" Background="Blue" Content="Button" />
Dimitrina
Telerik team
 answered on 23 Apr 2012
1 answer
135 views
I am using a TreeListView and want to scroll to a particular data item. This works fine if I have expanded the entire tree (hence I assume actually generating rows for all the data items). But if the tree is collapsed ScrollIntoView does not work. What is the recommended method to programatically display a particular data item in a TreeListView even if that data item has not been visible previously.

My datasets only contain approx 1000 items or so. Can I disable dynamic loading? I've had lots of problems trying to work with rows that apparently have not actually been created yet.

Thanks
Dave Goughnour
Dimitrina
Telerik team
 answered on 23 Apr 2012
2 answers
201 views
The data that is displayed in my track ball info is quite large and covers my chart series.

Is it possible to style the template for the track ball info so that the containing block is transparent? I'd like to see my chart and the tracked data.

Thanks
Kareema
Top achievements
Rank 2
 answered on 23 Apr 2012
3 answers
131 views

The diagram control looks very promising but I must be able to control the number and location of the connectors of the Diagram Shape.  I have been unable to locate how to do this.  My domain has a fixed number of entities that I will need to link together but each entity type will have between 1 and 11 connector points.  I will be using DataTemplates to completely control the shapes and was hoping in the template I could identify where I want the connectors to go.  Is it possible to achieve this?

Donovan

donovan
Top achievements
Rank 1
 answered on 21 Apr 2012
1 answer
97 views
I'm building a hierarchial grid using the self reference setting and everything seems to work as I want.  Using the dataloading event, I define the columns and grid properties.  A good example would be an org chart with n levels of employees.  Only the top level employees are displayed and any of them that have direct reports it will show the + to allow you to drill down (I have a filterdescriptor that filters out sub-employees so they are only visible as child records).  My issue is how to implement a Find function.  I have tried to bind the SelectedItem of each grid to a SelectedEmployee notify property.  If I do a find on a top-level employee, it works fine, but if it's a employee in a child grid, it doesn't work (I bound the child grids as (sender as GridViewDataControl).SelectedItem = new Binding("SelectedEmployee")).  If you can help with this, that would be great.  I also will need to auto expand all levels above this in order to display it after the fine.

Any help would be appreciated.

Troy
Maya
Telerik team
 answered on 21 Apr 2012
2 answers
188 views
Is there any example how to drive complex docking app (think: Visual Studio) completely by ViewModels using the model-first appoach (as opposed to view-first)? Something in the lines of  having a databound

ObservableCollection<
ToolViewModelBase> ShellViewModel.Tools

where each ToolViewModelBase  represents a dockable region in the shell?
bitbonk
Top achievements
Rank 1
 answered on 20 Apr 2012
0 answers
70 views

Hello, I just upgraded to the latest version and now when there is only 1 RadPane in a RadPaneGroup the tab strip is now visible with only one tab. This is a change in behavior from the old version (there was no tab strip visible). How do I restore the old behavior?

I am now using version 2012.1.215.40.
Edit: The issue was fixed in 2012.1.326.40

Thanks
Andrew
Top achievements
Rank 1
 asked on 20 Apr 2012
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?