Telerik Forums
UI for WPF Forum
1 answer
148 views
HI,
I am trying to display the following HTML content in WPF RadRichTextBox. The image tag is creating some issue that doesn't allow RadRichTextBox to render the HTML. Removing img tag 'src' property displays the content correctly. What am i doing wrong here?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
><title>Untitled</title>
<style type="text/css">
.p_CC664AAA { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
.s_62525130 { font-family: 'Segoe UI';font-style: Normal;font-weight: normal;font-size: 12px;color: #000000; } 
</style>
</head>
<body>
<p class="p_CC664AAA"><img width="127" height="95" src="http://www.google.com//intl/en_com/images/srpr/logo1w.png" /><span class="s_62525130" /></p>
</body>
</html>
Mihail
Telerik team
 answered on 24 Oct 2011
1 answer
161 views
Hi,
I am using a GridViewComboBoxColumn with incremental filtering:                                   
<telerik:GridViewComboBoxColumn Width="auto"
Header="{localization:Translate Key=Ressource_libelleRess,
Default='Libellé Ressource'}"
DataMemberBinding="{Binding RessourceMoyensID, Mode=TwoWay}"
ItemsSource="{Binding ListRessourceMoyens}"
DisplayMemberPath="Value.LibelleRessource"
SelectedValueMemberPath="Value.RessourceMoyensID"
IsComboBoxEditable="True">
<telerik:GridViewComboBoxColumn.EditorStyle>
<Style TargetType="telerik:RadComboBox">
<Setter Property="IsFilteringEnabled" Value="True"/>
<Setter Property="TextSearchMode" Value="Contains"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="StaysOpenOnEdit" Value="True"/>
<Setter Property="OpenDropDownOnFocus" Value="True"/>
</Style>
</telerik:GridViewComboBoxColumn.EditorStyle>
</telerik:GridViewComboBoxColumn>

When I have many items in the combobox (170 in one case, 6000 in another):
1. The filtering doesn't seem to work correctly (from 8 correct elements as in the DB, it shows me 5 correct and other 5 incorrect)
2. For the big one, there are performance issues (one lettre filters in 2-3 seconds).

Have you any solution to this?

Thanks in advance,


Valeri Hristov
Telerik team
 answered on 24 Oct 2011
1 answer
284 views
All terminology aside, I need to know when a pane is visible to a user.  And let me define visible as:

1. Floating panes are always visible
2. For panes in a tab group, the "selected" tab is visible, the rest are visible=false.
3. Pinned panes which are collapsed are visible = false.  If the user clicks on them and they expand, then visible = true for that time period.
4. Panes not in a tab group, are visible=true.

I need this, as our panes have calculation engines in them which consume resources.  And if a pane isn't visible, then those resources shouldn't be wasted.  

Through great panes, I've written a demo which attaches to EVERY event on RadDocking.  Trying to understand when things are triggered, as the documentation is insufficient in my opinion.  

The attached demo project has a Pane which does calculation when calculate is set to true.  So in essence, it needs to be "fixed" for the following cases (which I consider bugs, as there's no event capable of telling me of the appropriate state changes):

1. When a pane is added to a group, PaneStateChanged is called, but it's called BEFORE the state change, and not AFTER as the "ed" on Changed would imply.  So the pane isn't in it's new RadPaneGroup yet, and I don't know which panes to set calculate to false for.
2. Pinned tabs.  This doesn't work at all.  Make a pane, dock it in the main window.  unpin it so it slurps up to the top..  Now, when hovering over "pane 1", the pane is shown. .but no events are triggered on RadDocking.  How am I to know to turn on calculation for the duration of the showing? Is there an event somewhere else to tell me this?

It works in these cases, though the code to do it is ghetto.
1. Changing tabs in a group.  I had to bind to ActivePaneChanged, and iterate through the Parent's of New/Old Pane's tabs, and update them all for the state change.  This is wasteful as RadDocking knows what I want to know internally.

And great..  I can only attach pictures here.. wtf.  I'll add it to the support ticket then, and none of the lovely users of the community will be able to see it..  DUMB restriction!
Miroslav Nedyalkov
Telerik team
 answered on 24 Oct 2011
1 answer
74 views
Hi,

I need to populate the dropdown menu available at the bottom of the Radoutlooktoolbar. The idea is to provide menus and submenus when the user clicks the dropdown menu (the small inverted triangle) currently am totally unable to do that. I used ItemDropDownContentTemplate to accomplish this. I used the following code snippet.

 

<

 

 

telerik:RadOutlookBar x:Name="RadOutlookBar1"

 

 

 

MaxWidth="760" ItemsSource="{Binding}"

 

 

 

ItemTemplate="{StaticResource BarTemplate}"

 

 

 

ContentTemplate="{StaticResource redefineoutlook}"

 

 

 

TitleTemplate="{StaticResource BarTemplate}"

 

 

 

Margin="0,0,330,0" ItemDropDownContentTemplate="{StaticResource BarTemplate}">

I am successfully able to populate the Itemtemplate,Content template and the Title templates however the ItemDropdownContentTemplate is the missing link.
Bartemplate is something like below:

 

 

 

 

<DataTemplate x:Key="BarTemplate" >

 

 

 

 

<TextBlock Text="{Binding Path=A}" FontWeight="Bold" />

 

 

 

 

</DataTemplate>

Note:This template works fine in Titletemplate, ItemTemplate. Have no clue why it is not working in ItemDropdownContentTemplate. Kindly advise me where am wrong. Also let me know if there is anyother way to accomplish my requirements. This is rather urgent I need to do this ASAP.

-Kaarthik(skmit87@gmail.com)

 

Petar Mladenov
Telerik team
 answered on 24 Oct 2011
1 answer
92 views
I have a RadGridView with the EditTriggers set to "CellClick". In a normal scenario, I can click on a cell, edit it and the cell will take up the new value as expected. However, very rarely when I click on a cell, I can edit it but the value doesn't persist. I can't make out a pattern for the issue and it occurs randomly. I am using the 2010.2.0714.35 version of the grid. I would like to know if this is a known issue and if it's been fixed in a later version of the grid.

Some more details:
  1. I can see an icon on the left hand side when I edit a row and it usually goes away when I switch to an another row. The rows with the "locked" cells have this "editing icon" all the time. That is, even if I switch to another row, the icon doesn't go away and I can no longer edit any cells in that row.
  2. If I click on any cell in the rows with this issue, the text in the cell momentarily disappears. I can still enter in new text but of course it doesn't persist. If I move out of the cell, the old value comes back. In a normal cell, when I click on the cell, it will still retain the existing text and I can edit it.
  3. I am not doing anything particularly fancy with the grid. I am hooking into the CellValidating event to convert any newly entered text to lower case (business requirement). Here's the code:
    private void GridView_CellValidating(object sender, Telerik.Windows.Controls.GridViewCellValidatingEventArgs e)
            {          
                if (e.OldValue != e.NewValue)
                {
                    ((System.Windows.Controls.TextBox)(e.EditingElement)).Text = e.NewValue.ToString().ToLower(System.Globalization.CultureInfo.InvariantCulture);
                    IsEdited = true;
                }
            }
  4. This is the markup of the grid:
    <local:EquipmentsGridView x:Name="uxStowList" ListType="StowList" Deleting="OnDelete" SelectionMode="Extended"  CanUserInsertRows="True" ShowInsertRow="True"  ShowGroupPanel="True" telerik:StyleManager.Theme = "Office_Blue"
                                    IsFilteringAllowed="True" AutoExpandGroups="False"
                                        EditTriggers="CellClick" RowLoaded="ListRowLoaded" RowEditEnded="Gridview_RowEditEnded"  ColumnWidthChanged="uxStowList_ColumnWidthChanged" DataLoaded="uxStowList_DataLoaded" HorizontalAlignment="Left" VerticalAlignment="Top">
                                        
                                  <telerik:RadGridView.Columns>
                                           <custom:GridRowNumber Header="#" Width="50" />
                                           <telerik:GridViewColumn>
                                               <telerik:GridViewColumn.CellTemplate>
                                                   <DataTemplate>
                                                       <telerik:RadRibbonButton SmallImage="Resources\CrossIcon.png" Command="telerikGrid:RadGridViewCommands.Delete" CommandParameter="{Binding}" Name="btnDeleteStowList"  Click="btnDeleteStowList_Click" />
                                                   </DataTemplate>
                                               </telerik:GridViewColumn.CellTemplate>
                                           </telerik:GridViewColumn>
                                           <telerikGrid:GridViewSelectColumn></telerikGrid:GridViewSelectColumn>
                                       </telerik:RadGridView.Columns>
                                   </local:EquipmentsGridView>
    EquipmentsGridView is inheriting from RadGridView and the RowEditEnded event isn't doing anything to the grid.

Please let me know if I can provide more information.
Yordanka
Telerik team
 answered on 24 Oct 2011
3 answers
247 views

I am binding programatically to a GridViewComboBoxColumn (see C# below) and I am using the CellTemplate to display a RadComboBox instead of text.  The problem is that I do not know how to set the ItemSource for the RadComboBox in order to make it work.  Thanks in advance for any help!

((GridViewComboBoxColumn)this.RadGridView_TrusteeLedgers.Columns[1]).ItemsSource = trustees;

<telerik:GridViewComboBoxColumn Header="Trustee" DataMemberBinding="{Binding TrusteeID}" SelectedValueMemberPath="TrusteeID" DisplayMemberPath="TrusteeCode" Width="60" Name="Trustee">
    <telerik:GridViewComboBoxColumn.CellTemplate>
        <DataTemplate>
            <telerik:RadComboBox
                    ItemsSource="???"
                    SelectedValuePath="TrusteeID"
                    telerikControls:Theming.Theme="Office_Blue"
                    SelectedValue="{Binding TrusteeID, Mode=TwoWay}"
                    DisplayMemberPath="TrusteeCode" />
        </DataTemplate>
    </telerik:GridViewComboBoxColumn.CellTemplate>
Maya
Telerik team
 answered on 24 Oct 2011
3 answers
117 views
Hello,

I have updated with last release, and I have problems with drag&drop.

I have the following configuration
I drag an elt from a "palette" (in a radpane) to a diagram (in documenthost).
<telerik:RadDocking x:Name="xDocking" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Unloaded="RadDocking_Unloaded"
                            telerik:RadDocking.SerializationTag="xDocking"
                            v6:RadDockingExtensions.RemovePanesWhenClosed="True" v6:RadDockingExtensions.SaveFloatingPane="True">
            <telerik:RadDocking.CompassStyle>
                <Style TargetType="{x:Type telerik:Compass}">
                    <Setter Property="IsCenterIndicatorVisible" Value="True"/>
                </Style>
            </telerik:RadDocking.CompassStyle>
            <telerik:RadDocking.DocumentHost >
                <Grid>
                      <DiagramControl>[... Target of my drop ...] </DiagramControl>
 </Grid>
            </telerik:RadDocking.DocumentHost>
  
            <telerik:RadSplitContainer x:Name="DockLeft" InitialPosition="DockedLeft" Orientation="Vertical" Width="250" telerik:RadDocking.SerializationTag="DockedLeft">
  
                <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="200,30"  telerik:RadDocking.SerializationTag="g1" AllowDrop="False">
                    <telerik:RadPane Header="{x:Static v6Properties:Resources.newelement}" CanDockInDocumentHost="False" CanUserClose="False"  CanFloat="False"
                                     ContextMenuTemplate="{x:Null}" telerik:RadDocking.SerializationTag="palette"
                                     AllowDrop="False">
  [.. Control where I select an elt to drop ...]
</telerik:RadPane>
</<telerik:RadPaneGroup>

The drag&drop performed is not made by telerik.
But now, the first drag i make, i obtain the following error :
Ă  Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnGiveFeedbackEventHandler(Object sender, GiveFeedbackEventArgs e) dans c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragDropManager.cs:ligne 1700
  Ă  Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnGiveFeedback(Object sender, GiveFeedbackEventArgs e) dans c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragDropManager.cs:ligne 1779
  Ă  System.Windows.GiveFeedbackEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
  Ă  System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
  Ă  System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
  Ă  System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
  Ă  System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
  Ă  System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
  Ă  System.Windows.OleDragSource.RaiseGiveFeedbackEvent(GiveFeedbackEventArgs args)
  Ă  System.Windows.OleDragSource.MS.Win32.UnsafeNativeMethods.IOleDropSource.OleGiveFeedback(Int32 effect)
   
  Recherche de la source pour 'c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragDropManager.cs'. Checksum: MD5 {47 7b 42 df ec cf a4 e7 e3 a d3 ef cf 9c e9 b9}

the others drag&drop work but not really as before :

Sometimes, my diagram component doesn't receive the drop event, the drawed cue disappears ???

Have you an idea ?

Probably the diagram component dragdrop is based on microsoft dragdrop, and there's some concurrency...

Aurore

Vlad
Telerik team
 answered on 24 Oct 2011
1 answer
91 views
Hi,

My company is getting ready to release a few projects that use the Telerik controls.  In development however we have used some code shared by an admin on the forums as a code example.  Are there any license restrictions placed on this code?
Vlad
Telerik team
 answered on 24 Oct 2011
3 answers
192 views
Is it possible to give the have the Expression Editor pull properties from multiple object for the fields in the tree view?  Also, is it possible to make the Editor check if child objects of the object it is passed have properties?

Thank you very much
Ron
Top achievements
Rank 1
 answered on 21 Oct 2011
4 answers
120 views
I have a DataTable that is the source for my DataFilter but I need to get the FilteredSource as a DataTable back out. Is there an easy way to accomplish this using the current control?

Thanks,
Shawn
David
Top achievements
Rank 1
 answered on 21 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?