Telerik Forums
UI for WPF Forum
1 answer
87 views
Hello,
I have a problem with horizontal scrolling in the gridview.
I'm using the gridview with some premade columns and some columns that are added in code behind.
For filling in those programmaticly added columns I'm using a CellTemplate, because the value in each cell depends on column header and row item properties.
So, everything works just fine until the horizontal scroll. After it in some cells of the programmaticly added columns values from the premade columns appear.
With out celltemplate nothing like that happens.
Could you please help me?
Milan
Telerik team
 answered on 27 Jan 2011
2 answers
99 views
Hi there, 

I have a quick request - I'd like to bind a custom Command to a HeaderCloseButton on a pane docked on the left, top, bottom or top (ie: not as document). Any ideas how to do this?

I have achieved the same for tabbed documents by overriding the Pane HeaderTemplate as follows:

<!-- Define the style for component item headers -->
            <DataTemplate x:Key="PaneHeaderTemplate">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <TextBlock Text="{Binding ComponentDisplayName}"/>
                    <Button Command="{Binding CloseComponentCommand}" Style="{StaticResource ReportButtonStyle}"
                            Margin="10,0,0,0" ToolTipService.ToolTip="Remove Component">
                        <Button.Content>
                            <Path Data="M0,0 L6,6 M6, 0 L0,6" Stroke="Black" StrokeThickness="1"
                                    SnapsToDevicePixels="True" />
                        </Button.Content>
                    </Button>
                </StackPanel>
            </DataTemplate>

However modifying the TitleTemplate only changes the title area, not buttons on the pane. 

Any ideas? 

thanks!
Andrew Thompson
Top achievements
Rank 1
 answered on 27 Jan 2011
1 answer
111 views
Is it possible to duplicate a selected RadPade (with it's content inside) programatically?
Pana
Telerik team
 answered on 27 Jan 2011
6 answers
45 views
Hello there,

I just tried to use the WPF GridView control. But I ran into a very weird issue. 
Repro steps:
1. Double click a cell to enter edit mode
2. You changed the cell but then dobule click a cell in another row
3. You expect that the previous row will save the change
4. But now you get the exception see the attached image.

I can't repro this every time. What I feel is that if I run this in a lowend machine (2G memory), it will occur much often than a highend machine.
Any help will be highly appreicated.
David
David
Top achievements
Rank 1
 answered on 26 Jan 2011
2 answers
206 views
I followed the example of using a self joined hierarchtical treeview using your DataItemCollection and extending my Entity to include SetOwner, Children, etc.  You showed me in this post http://www.telerik.com/community/forums/wpf/treeview/persist-item-order.aspx.  That all works perfectly!  What I am unsure of is how to delete a bound child then.  I thought if I just handled the ObservableCollection.CollectionChanged and removed the item from the underlining datasource it would update the visual tree, but it doesnt.  Here is what I am doing:

private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var selcontainer = treeColumns.SelectedContainer;
                WorkFlow selitem = treeColumns.SelectedItem as WorkFlow;

                _collection.Remove(selitem);
            }
          }

I also handled the CollectedChanged event:

    void _collection_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            try
            {

                if (e.Action == NotifyCollectionChangedAction.Remove)
                {
                    foreach (object geoobject in e.OldItems)
                    {
                        ctx.WorkFlows.DeleteObject((WorkFlow)geoobject);
                    }
                }

                ctx.SaveChanges();
            }
            catch (Exception ex)
            {
                Helper.SetError(ex);
            }
        }

What do I need to do to actually refresh the treeview so that the object is gone, or should I be taking another approach?

Petar Mladenov
Telerik team
 answered on 26 Jan 2011
3 answers
183 views
I am using the RadTreeView control and was wondering if it was possible to have a context sensitive ContextMenu.  I have a tree with different types of items and I would like to have different ContextMenu content based on the type of item that was clicked.  I looked at the documenation and it doesn't seem this is possible.  Is it?

Thanks.

Derek
Petar Mladenov
Telerik team
 answered on 26 Jan 2011
1 answer
143 views
I am making a virtual keyboard in xaml/cs and running into a few problems.

Shift/control. Currently I detect keys by having the user type in a textbox. Depending on the key entered into the textbox I will highlight the appropriate key and delete anything in the textbox. This runs into the problem of shift and control not actually typing a character. How might I detect shift/control?

I also have a similar problem with delete. I had an idea of defaulting the textbox to a space, so I can see the space go away and know there was a delete pressed. However the text curser keeps going to the beginning of the textbox before the space. Any method of forcing the curser to the end of the line?
Ivan Ivanov
Telerik team
 answered on 26 Jan 2011
6 answers
289 views
We're only using the DayViewDefinition in our implementation so there is only one button "Day".  Is there any way to hide this button since it isn't needed?

Thanks,
Greg
Greg
Top achievements
Rank 1
 answered on 26 Jan 2011
1 answer
262 views
Hi,
      I have one clarification.
I am using telerik radcombo box in our latest project.here i am inserting  all country values from one XML file to one rad combo box.

Every thing is fine.But the selected value is not showing on combo box. also the editable option not working.
<Window x:Class="WpfApplication7.MainWindow"
        Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Window.Resources>
        <XmlDataProvider x:Key="XmlData" Source="CountryList.xml" XPath="CountryList"/>
    </Window.Resources>
    <Grid>
        <telerik:RadComboBox Height="23" ItemsSource="{Binding Source={StaticResource XmlData}, XPath=./CountryName}" DisplayMemberPath="@Name"  HorizontalAlignment="Left" Margin="176,88,0,0" Name="comboBox1" VerticalAlignment="Top" Width="156" IsEditable="True" />
    </Grid>
</Window>
and This is my countrylist Xml file.
<?xml version="1.0" encoding="utf-8" ?>
<CountryList>
  <CountryName Name="Afghanistan"/>
  <CountryName Name="Akrotiri"/>
  <CountryName Name="Albania"/>
  <CountryName Name="Algeria"/>
  <CountryName Name="American Samoa"/>
  <CountryName Name="Andorra"/>
  <CountryName Name="Angola"/>
  <CountryName Name="Anguilla"/>
  <CountryName Name="Mauritius"/>
  <CountryName Name="Mayotte"/>
  <CountryName Name="Mexico"/>
  <CountryName Name="Micronesia"/>
  <CountryName Name="Moldova"/>
  <CountryName Name="Monaco"/>
  <CountryName Name="Mongolia"/>
  <CountryName Name="Montserrat"/>
  <CountryName Name="Morocco"/>
  <CountryName Name="Western Sahara"/>
  <CountryName Name="Yemen"/>
  <CountryName Name="Zambia"/>
  <CountryName Name="Zimbabwe"/>
  </CountryList>

i am setting isEditable=True;(If i want to select india mean i just put cursor on combo box then press i.that time all country name will display with first letter i.But here not working.)

I have attached the sample solution also here.

pls give me correct solution.
Konstantina
Telerik team
 answered on 26 Jan 2011
2 answers
87 views
I'm having trouble with my row details. How do I get text in a textblock to wrap so that the user doesn't have to scroll horizontally to view the details?

My Row Details Template is as follows:
<StackPanel Margin="8,4">
   <TextBlock Text="Description:" FontWeight="Bold" />
   <TextBlock Text="{Binding Description}" FontStyle="Italic" TextWrapping="WrapWithOverflow" />
</StackPanel>

If the Description is longer than the current width of the grid, I get scrollbars. No matter what I set the TextWrapping attribute to. How do I wrap the text to the width of the grid?
Rayne
Top achievements
Rank 1
 answered on 26 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?