Telerik Forums
UI for WPF Forum
1 answer
118 views
I am using a bar chart where I need to show a unit bar if a certain value is 1 and nothing if a value is 0. The ticks need to show a categorical label Present or Not Present. How can I achieve this?

Thanks.
Nikolay
Telerik team
 answered on 29 Jun 2011
3 answers
298 views
My Requirement is I want add Image for RadComboBoxItem from static folder.
The following was my code.

<
telerik:RadComboBox Name="Salutaion" Grid.Column="4" Width="75" Grid.Row="0" HorizontalAlignment="Left"
 IsEditable="True" IsReadOnly="True"  telerik:StyleManager.Theme="Office_Blue"
 ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Clear">
<telerik:RadComboBoxItem Content="Male"/>
<telerik:RadComboBoxItem Content="Female"/>
</telerik:RadComboBox> Thanks and Regards Naresh Mesineni
Yana
Telerik team
 answered on 28 Jun 2011
0 answers
76 views
Hi,

GridView with XML works fine...

                                                                <Grid.Resources>
                                                                    <XmlDataProvider x:Key="MODSource" Source="settings\module.xml" XPath="//Attributes/Attribute[@AttributeGroup='Template']"></XmlDataProvider>
                                                                </Grid.Resources>
                                                                <telerik:RadGridView Visibility="Visible" Name="radGridView1" AutoGenerateColumns="False" ItemsSource="{Binding Source={StaticResource MODSource}}" ShowGroupPanel="False">
                                                                    <telerik:RadGridView.Columns>
                                                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Name] }" Header="Name">
                                                                            <telerik:GridViewDataColumn.CellTemplate>
                                                                                <DataTemplate>
                                                                                    <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Name\']}">
                                                                                    </ContentControl>                                                                                       
                                                                                </DataTemplate>
                                                                            </telerik:GridViewDataColumn.CellTemplate>
                                                                        </telerik:GridViewDataColumn>                                                                      
                                                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Version] }" Header="Version">
                                                                            <telerik:GridViewDataColumn.CellTemplate>
                                                                                <DataTemplate>
                                                                                    <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Version\']}">
                                                                                    </ContentControl>
                                                                                </DataTemplate>
                                                                            </telerik:GridViewDataColumn.CellTemplate>
                                                                        </telerik:GridViewDataColumn>
                                                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\beschr] }" Header="Beschreibung" Width="*">
                                                                            <telerik:GridViewDataColumn.CellTemplate>
                                                                                <DataTemplate>
                                                                                    <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'beschr\']}">
                                                                                    </ContentControl>
                                                                                </DataTemplate>
                                                                            </telerik:GridViewDataColumn.CellTemplate>
                                                                        </telerik:GridViewDataColumn>
                                                                    </telerik:RadGridView.Columns>
                                                                </telerik:RadGridView>

But how can i add a boolean Column out of my xml file: <ContentAttribute AttributeName="Aktiv">Ja</ContentAttribute>


Thanks
Regards
Rene
ITA
Top achievements
Rank 1
 asked on 28 Jun 2011
0 answers
134 views
Hi,

i have a working RadGridView with an XML-File which is bind by XMLDataProvider. I want to use a Telerik RadButton with a Command to insert, delete or edit Rows. But it does not work:

CODE:
                                                        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="left" Margin="0,5,0,0">
                                                            <telerik:RadButton Width="100" Content="Delete selected rows" Margin="0,0,5,0"
                                                                                Command="telerikGrid:RadGridViewCommands.Delete" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                            <telerik:RadButton Width="100" Content="Add new row" Margin="0,0,5,0"
                                                                                Command="telerikGrid:RadGridViewCommands.BeginInsert" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                            <telerik:RadButton Width="100" Content="Save insert/edit" Margin="0,0,5,0"
                                                                                Command="telerikGrid:RadGridViewCommands.CommitEdit" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                            <telerik:RadButton Width="100" Content="Cancel insert/edit"
                                                                                Command="telerikGrid:RadGridViewCommands.CancelRowEdit" CommandTarget="{Binding ElementName=radGridView2}"  />
                                                        </StackPanel>
                                                        <Grid Grid.Row="1">                                                           
                                                            <Grid.Resources>
                                                                <XmlDataProvider x:Key="MADSource" Source="settings\mandanten.xml" XPath="//Attributes/Attribute[@AttributeGroup='Mandant']"></XmlDataProvider>
                                                            </Grid.Resources>
                                                            <telerik:RadGridView Visibility="Visible" x:Name="radGridView2" AutoGenerateColumns="False" ItemsSource="{Binding Source={StaticResource MADSource}}"
                                                                                 CanUserDeleteRows="True" CanUserInsertRows="True" IsReadOnly="False" ShowGroupPanel="False" SelectionMode="Extended">
                                                                <telerik:RadGridView.Columns>
                                                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Name] }" Header="Name" Width="120">
                                                                        <telerik:GridViewDataColumn.CellTemplate>
                                                                            <DataTemplate>
                                                                                <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Name\']}">
                                                                                </ContentControl>
                                                                            </DataTemplate>
                                                                        </telerik:GridViewDataColumn.CellTemplate>
                                                                    </telerik:GridViewDataColumn>
                                                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Host] }" Header="Host" Width="100">
                                                                        <telerik:GridViewDataColumn.CellTemplate>
                                                                            <DataTemplate>
                                                                                <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Host\']}">
                                                                                </ContentControl>
                                                                            </DataTemplate>
                                                                        </telerik:GridViewDataColumn.CellTemplate>
                                                                    </telerik:GridViewDataColumn>
                                                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Port] }" Header="Port" Width="50">
                                                                        <telerik:GridViewDataColumn.CellTemplate>
                                                                            <DataTemplate>
                                                                                <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Port\']}">
                                                                                </ContentControl>
                                                                            </DataTemplate>
                                                                        </telerik:GridViewDataColumn.CellTemplate>
                                                                    </telerik:GridViewDataColumn>
                                                                </telerik:RadGridView.Columns>
                                                            </telerik:RadGridView>
CODEBEHIND:
    Public Sub New()

        Dim deleteCommand As ICommand = RadGridViewCommands.Delete
        Dim beginInsertCommand As ICommand = RadGridViewCommands.BeginInsert
        Dim cancelRowEditCommand As ICommand = RadGridViewCommands.CancelRowEdit
        Dim commitEditCommand As ICommand = RadGridViewCommands.CommitEdit

        InitializeComponent()
    End Sub

I get no errors, but the buttons do not work and i can't edit the Columns. HELP!!!
Rene
ITA
Top achievements
Rank 1
 asked on 28 Jun 2011
4 answers
187 views
Hi,

How can I format time to display it in 24 format ?
ThomasJ
Top achievements
Rank 2
 answered on 28 Jun 2011
1 answer
143 views
Hello All,

I use Schedule view. After creating an appointment when I want to resize it using the mouse, the resize animation is not visible, say I dont see till which point I dragged it. But  in examples it is available. Can any one help me getting this particular behaviour

Dheena
Konstantina
Telerik team
 answered on 28 Jun 2011
3 answers
124 views
Searching for a WPF property grid I found this forum. I'm implementing a solution, where I need a property grid soon.

How long will it take until you release it?

Greets
Rossen Hristov
Telerik team
 answered on 28 Jun 2011
4 answers
168 views
Where is the documentation for how to build expressions in the editor?

the functions that I need are not working properly or I'm using it in a wrong way

Yavor Georgiev
Telerik team
 answered on 28 Jun 2011
2 answers
254 views

Hy,

When moving our application window or resizing it then we get an ArgumentNullException in the DataItemAutomationPeer class.

We are currently on the binaries RadControls for WPF Q1 2011.
I looked at the currently available source code "01348RadControls_for_WPF_40_2011_1_0613_DEV_hotfix".

Callstack on Exception:
  Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.Automation.DataItemAutomationPeer.DataItemAutomationPeer(object dataItem, Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer dataControlAutomationPeer) Line 78 C#
> Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.Automation.GridViewDataItemAutomationPeer.GridViewDataItemAutomationPeer(object dataItem, Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer dataControlAutomationPeer) Line 25 C#
  Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.Automation.RadGridViewAutomationPeer.CreateDataItemAutomationPeer(object dataItem) Line 97 + 0x2f bytes C#
  Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer.GeneratePeersForDataItems(System.Collections.Generic.List<System.Windows.Automation.Peers.AutomationPeer> newPeerList, Telerik.Windows.Controls.GridView.Automation.AutomationPeerStorage<object,Telerik.Windows.Controls.GridView.Automation.DataItemAutomationPeer> oldCachedPeers) Line 111 + 0x1c bytes C#
  Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer.GetItemPeers() Line 101 C#
  Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.Automation.GridViewVirtualizingPanelAutomationPeer.GetChildrenCore() Line 79 + 0x21 bytes C#

What I saw in the source is:

In class GridViewDataControlAutomationPeer a check is done for (dataitem == null), see below:

        private void GeneratePeersForDataItems(List<AutomationPeer> newPeerList, AutomationPeerStorage<object, DataItemAutomationPeer> oldCachedPeers)
        {
            foreach (object dataItem in this.Items)
            {
                DataItemAutomationPeer dataItemPeer = oldCachedPeers.FindPeer(dataItem);

                if (dataItemPeer == null)
                    dataItemPeer = this.CreateDataItemAutomationPeer(dataItem);

                SetUpOwnerRowEventsSource(dataItemPeer);

                this.cachedPeers[dataItem] = dataItemPeer;
                newPeerList.Add(dataItemPeer);
            }
        }

Then later in the ctor of DataItemAutomationPeer I saw the following code:
        protected DataItemAutomationPeer(object dataItem, GridViewDataControlAutomationPeer dataControlAutomationPeer)
            : base(dataControlAutomationPeer.OwnerGridViewDataControl)
        {
            if (dataItem == null)
                throw new ArgumentNullException("dataItem");
            if (dataControlAutomationPeer == null)
                throw new ArgumentNullException("dataControlAutomationPeer");

            this.dataItem = dataItem;
            this.dataControlAutomationPeer = dataControlAutomationPeer;
        }

In my case I get the exception from this check in the ctor.

Kind regards,
Yvonne

Yvonne
Top achievements
Rank 1
 answered on 28 Jun 2011
3 answers
229 views
Hi,

I was trying to apply filter on DataGridView column(IsFilterable =True). But not able to show icon on column header. My column is bounded with ObservalCollection<MyType> and a am showing values in a Listbox.

Is it possible to show filtering on collection type column, also i want to show custom control(FilterControl) when user click on filter icon.
For example suppose my RadGridView bounded to a collection "ClaimList"
Collection ClaimList includes:
- Claim Number(int)
- Vehicle(String)
- Contact(String)
- Inspection date(DateTime)
- Next Actions (ObservalCollection<IClaimActions>)

The problem is with column Next Action which shows a list of possible actions on a particular Claim Number.

Thanks,
Umesh Kumar
Rossen Hristov
Telerik team
 answered on 28 Jun 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?