Telerik Forums
UI for WPF Forum
1 answer
313 views

Hello,

I‘d like to show  xml data (with xsd) in a RadGridView and edit its value. The values in the grid should allow only this data, which are allowed in xsd. For instance, for enum type I would like to have a ComboBox column.

 

In Xaml I have a following code:

 

<telerik:RadGridView x:Name="dataGrid" AutoGenerateColumns="True" CanUserResizeRows="True"> 
</telerik:RadGridView>
 
The xml data is loaded in a DataSet and connected to the grid:
 
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            var data = new DataSet();
            data.ReadXmlSchema(@"D:\Development\Data\IBISConfig.xsd");
            data.ReadXml(@"D:\Development\Data\IBISConfig.xml");
 
            dataGrid.DataMember = data.Tables[data.Tables.Count - 1].TableName;
            dataGrid.ItemsSource = data;
        }
 
 
The Xml file is shown as a hierachical data, but the data types in the columns are always strings. 
 
How can I change the column type, without to parse the xsd?

Best Regards
Marian
 
Dimitrina
Telerik team
 answered on 12 Sep 2013
2 answers
146 views
I want to allocate in ClipBoard object the selected row:
xaml:

<telerik:RadGridView x:Name="dgvOrdenes" ShowGroupPanel="False" ShowColumnHeaders="True" ShowColumnFooters="False"
                            ItemsSource="{Binding V_Or2}" HorizontalAlignment="Left"
                            Margin="10,44,-83,0" ShowInsertRow="False" VerticalAlignment="Top" Height="216"
                            Width="810" Grid.RowSpan="4" AutoGenerateColumns="False" Grid.ColumnSpan="3" >
 
           <telerik:RadGridView.Columns>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding [Or]}" Header="{Resx RadGridViewOr_Or}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Alta}" Header="{Resx RadGridViewOr_Alta}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Cierre}" Header="{Resx RadGridViewOr_Cierre}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Matricula}" Header="{Resx RadGridViewOr_Matricula}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Modelo}" Header="{Resx RadGridViewOr_Modelo}" />
           </telerik:RadGridView.Columns>
 
           <ContextMenuService.ContextMenu>
               <ContextMenu>
 
                   <MenuItem Click="MenuItem6_Click" Header="copy row" >
                       <MenuItem.Icon>
                           <Image Source="/Imagenes/bullet-blue-icon.png" Height="10" Width="10"/>
                       </MenuItem.Icon>
                   </MenuItem>
 
 
               </ContextMenu>
           </ContextMenuService.ContextMenu>
 
 
       </telerik:RadGridView>


code-behind: (it does fails)
Private Sub MenuItem6_Click(sender As Object, e As RoutedEventArgs)
 
       Clipboard.SetData(DataFormats.Text, TryCast(Me.dgvordenes.ItemContainerGenerator.ContainerFromItem(Me.dgvordenes.SelectedItem), R)
 
 
 
 
   End Sub
Enric
Top achievements
Rank 1
 answered on 12 Sep 2013
2 answers
224 views
Hi,

in your OrgChart example i found a way to Export the diagram to png or html. Two questions:

1) why ist the Background of the Image black if i Export the Diagramm to png?
2) where do i find the "HTMLExportHelper.CreateHTMLFile(this.diagram);" HTMLExportHelper?

Thanks
Best Regards
Rene
ITA
Top achievements
Rank 1
 answered on 12 Sep 2013
2 answers
224 views
Hi,

I am hosting a radgridview in a RadDocumentPane,  The gridview's source is set by code and can change dependent on user selection.  I would like the radgridview height to size to the RadDocumentPane so that the scrollbars would show automatically and the radgridview would not extend beyond the bottom of the RadDocumentPane.  I have not been able to acheive this, would you please advice me on this.

Regards,
Joe

 <telerik:RadDocking   BorderThickness="0" Padding="2">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer  >
                    <telerik:RadPaneGroup>
                        <telerik:RadDocumentPane  telerik:StyleManager.Theme="Office_Black" x:Name="optpnl" Width="400" >
                            <StackPanel Orientation="Vertical" >                        
                                <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"  >
                                    <telerik:RadGridView x:Name="InfoGrid" RowHeight="10.5" telerik:StyleManager.Theme="Office_Black"
                                AutoGenerateColumns="True" ShowGroupPanel="False"  AlternateRowBackground="LightBlue"  AlternationCount="2"
                                IsReadOnly="False" IsFilteringAllowed="False" RowIndicatorVisibility="Collapsed"
                                CanUserReorderColumns="True" CanUserSortColumns="False" Padding="0" Margin="2,2,2,2">
                                    </telerik:RadGridView>
                                </ScrollViewer>
                                <telerik:RadBusyIndicator x:Name="busyInd"  telerik:StyleManager.Theme="Office_Black"  ></telerik:RadBusyIndicator>
                            </StackPanel>
                        </telerik:RadDocumentPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>
Joe Bohen
Top achievements
Rank 1
 answered on 12 Sep 2013
1 answer
95 views
We are trying to build a FilterDestriptor with FilterValues in German format for numeric decimal Values.

In German Culture ("de-DE") the double value 0.1 is written 0,1 (with comma), but FilterDesriptor will not parse this correctly although the thread's CurrentCulture is German. So "0,1" will be parsed incorrectly as 1.0D when using the constructor to build a FilterDescriptor:

FilterDescriptor mydescriptor = FilterDescriptor(FilterMember, FilterOperator, "0,1", FilterIsCaseSensitive);

Where can I set the culture to use for number conversion???
Rossen Hristov
Telerik team
 answered on 12 Sep 2013
1 answer
153 views
Hi, 

after updateing to the most current internal build I get the error
ArgumentException: 'Windows8' is not a valid value for the 'Telerik.Windows.Controls.StyleManager.Theme' property on a Setter.

The File producing this looks like this (and worked before):


<ResourceDictionary
    xmlns:XTelerik="clr-namespace:XControlsWPF.XTelerik;assembly=XControlsWPF">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/XControlsWPF;component/Styles.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/XDiagramWPF;component/Assets/XDiagramStyles.xaml"/>
        <!--       
        <telerik:Windows8ResourceDictionary/>
        -->
    </ResourceDictionary.MergedDictionaries>
    <telerik:Windows8Colors x:Key="Windows8Colors" />
    <SolidColorBrush x:Key="AccentBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.AccentColor}" />
    <SolidColorBrush x:Key="BasicBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.BasicColor}" />
    <SolidColorBrush x:Key="StrongBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.StrongColor}" />
    <SolidColorBrush x:Key="MainBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.MainColor}" />
    <SolidColorBrush x:Key="MarkerBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.MarkerColor}" />
    <SolidColorBrush x:Key="ValidationBrush" Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.ValidationColor}" />
 
    <Style TargetType="{x:Type XTelerik:XCheckButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type XTelerik:XButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type telerik:RadToggleButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type Button}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
    <Style TargetType="{x:Type telerik:RadButton}">
        <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
        <Setter Property="Padding" Value="6,3"/>
    </Style>
 
    <Style TargetType="{x:Type telerik:RadBusyIndicator}" BasedOn="{StaticResource DarkBusyBackgroundStyle}" />
 
    <Style TargetType="TextBox">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}" />
    </Style>
    <Style TargetType="Grid">
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}" />
    </Style>
</ResourceDictionary>

Manfred
Yana
Telerik team
 answered on 12 Sep 2013
1 answer
159 views
Hi
I was trying to set margin of RadAutoCompleteBox by override the default style of the control. If I'm doing it this way, the margin works as well. But if I'm searching for some items, no entries are shown. If I'm setting margin explicite on the control it self it works perfectly.
Do you know how to prevent this issue?

Here my Style:
 
<Style x:Key="RadAutoCompleteBoxStyle" TargetType="{x:Type telerik:RadAutoCompleteBox}"><br>        <Setter Property="IsTabStop" Value="True"/><br>        <Setter Property="TextBoxStyle"><br>            <Setter.Value><br>               ....<br>            </Setter.Value><br>        </Setter><br>        <Setter Property="BorderBrush" Value="#FF848484"/><br>        <Setter Property="BorderThickness" Value="1"/><br>        <Setter Property="Background" Value="White"/><br>        <Setter Property="Padding" Value="0,0,3,3"/><br>        <Setter Property="Cursor" Value="IBeam"/><br>        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/><br>        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/><br>        <Setter Property="SnapsToDevicePixels" Value="True"/><br>        <b><Setter Property="Margin" Value="5,2"/></b><br>    </Style>


And here the Control:
<telerik:RadAutoCompleteBox Grid.Row="0" Grid.Column="1"
                                    SelectionMode="Single"
                                    ItemsSource="{Binding LandItems}"
                                    SelectedItem="{Binding SelectedLand}"
                                    DisplayMemberPath="LanISOCodeBezeichnungConcat" TextSearchMode="Contains"
                                    Style="{DynamicResource RadAutoCompleteBoxStyle}"/>

The Issue looks like this:


That's how it should look like:


Thanks for your help


Michael

Yana
Telerik team
 answered on 12 Sep 2013
0 answers
79 views

Hy,

I’m using c# & WPF to preview a data having as a first column a Boolean ,in my case the radGridView display this column as a checkbox
even the header of this column [every thing is good right now :)] 

The problem is that I can't figure out how to attach an event to the header checkbox to selec/unselect all lines

best regards

Yahya
Top achievements
Rank 1
 asked on 11 Sep 2013
1 answer
193 views
Hi there, 

I am trying to get familiar with this control and how to style it as per requierements

What is the best approach to get the mockup attached?

I mean, what events, properties and methods whould I take advantage from?
If you have any sample code, it would be great as well, but point me in the right direction will be a great starting point

Thanks in advance

Fernando

Kalin
Telerik team
 answered on 11 Sep 2013
1 answer
122 views
Hello, I'm a beginner.
If you don't mind, could you post on EntityFrameWork 5.0 Database First  Simple Project Source?
Please give me a source to understand ScheduleView.
Thank you.








Kalin
Telerik team
 answered on 11 Sep 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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?