Telerik Forums
UI for WPF Forum
4 answers
136 views
Hi there,

I have a custom MultiSelect attached property, I can use it with a ListBox however I can't seem to use it with your grid view, I get an error that say's property 'IsEnabled' is not attachable to type elements of type 'RadGridView' - Why would it work with a listbox but not a gridview? I mean, it's just an attached property - I don't see what the issue is with a the grid.

Here is the code for the MultiSelect.cs
public static class MultiSelect
  {
      static MultiSelect()
      {
          Selector.ItemsSourceProperty.OverrideMetadata(typeof(Selector), new FrameworkPropertyMetadata(ItemsSourceChanged));
      }
 
      public static bool GetIsEnabled(Selector target)
      {
          return (bool)target.GetValue(IsEnabledProperty);
      }
 
      public static void SetIsEnabled(Selector target, bool value)
      {
          target.SetValue(IsEnabledProperty, value);
      }
 
      public static readonly DependencyProperty IsEnabledProperty =
          DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(MultiSelect),
              new UIPropertyMetadata(IsEnabledChanged));
 
      static void IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
      {
          Selector selector = sender as Selector;
          IMultiSelectCollectionView collectionView = selector.ItemsSource as IMultiSelectCollectionView;
 
          if (selector != null && collectionView != null)
          {
              if ((bool)e.NewValue)
              {
                  collectionView.AddControl(selector);
              }
              else
              {
                  collectionView.RemoveControl(selector);
              }
          }
      }
 
      static void ItemsSourceChanged(object sender, DependencyPropertyChangedEventArgs e)
      {
          Selector selector = sender as Selector;
 
          if (GetIsEnabled(selector))
          {
              IMultiSelectCollectionView oldCollectionView = e.OldValue as IMultiSelectCollectionView;
              IMultiSelectCollectionView newCollectionView = e.NewValue as IMultiSelectCollectionView;
 
              if (oldCollectionView != null)
              {
                  oldCollectionView.RemoveControl(selector);
              }
 
              if (newCollectionView != null)
              {
                  newCollectionView.AddControl(selector);
              }
          }
      }
  }
Thanks for any help...
ken
Top achievements
Rank 1
 answered on 30 Mar 2011
1 answer
94 views
Hi there,  Really getting somewhere with using the ScheduleView, It has enabled to solve a good few problems in recent developments. 

One thing that we're trying to achieve now is to Schedule appointments that don't necessarily have an actual start & end datetime but rather plan something in terms of Days.

For instance, if a user wanted to plan a 5 day conference but had no start date would it be possible to show
Day 1 | Day 2 | Day 3 | Day 4 | Day 5 

as the major horizontal tick on the TimeLine view (we're using the Timeline view exclusively)  Also would it be able to go from Day 1 up to Day N where N is the VisibleDays property?

This would allow the user to build a profile of the event which could be saved somehow and then applied at a different point when the actual dates are known.

To work out the relative day I would have the control manage dates between DateTime.Today up to N visible days and work out the relative days from that but I'd really like to be able to display Day X in the header.

I've tried a few things but nothing seems to work :\
Valeri Hristov
Telerik team
 answered on 30 Mar 2011
7 answers
322 views
Hi

I am setting

StepAction="MoveRange" and range is moving with the mouse click.

 

 

 

But the issue is that when I a dragging mouse then range is changing. How do I disable the Mouse drag.




HorizontalAlignment
="Right"

 

 

 

 

IsSnapToTickEnabled="True"

 

 

 

 

Margin="0,10,12,52"

 

 

 

 

Minimum="1"

 

 

 

 

Name="monthSlider"

 

 

 

 

Maximum="12"

 

 

 

 

SmallChange="0"

 

 

 

 

StepAction="MoveRange"

 

 

 

TickFrequency="1"

 

 

 

LargeChange="3"

 

 

 

 

SelectionEnd="3"

 

 

 

SelectionStart="1"

 

 

 

IsSelectionRangeEnabled="True"

 

 

 

 

SelectionRangeChanged="monthSlider_SelectionRangeChanged"

 

Petar Mladenov
Telerik team
 answered on 30 Mar 2011
2 answers
131 views
How could I change the timeformat on the RadScheduleView? In RadScheduler I could use TimelineHeaderFormat but that is not available in RadSchedulerView.  

//Ola
Dani
Telerik team
 answered on 30 Mar 2011
2 answers
580 views
Hi,
How we can a delete a row from raddatagrid by using MVVM pattern?
Vlad
Telerik team
 answered on 30 Mar 2011
4 answers
201 views
Hi all,
can you give an example for binding a RadColumnSparkline to data ? I got the RadLinearSparkline working, but the RadColumnSparkline seems to need a different data format.

Thanks in advance
Guido

Guido
Top achievements
Rank 1
 answered on 30 Mar 2011
2 answers
104 views
Hello,

Are there any plans to include Office 2010 theme for WPF controls?  especially for ribbon controls?
Thanks in advance.

Shawn
Nikolay
Telerik team
 answered on 30 Mar 2011
1 answer
178 views
How can I set it to WindowStartupLocation.CenterOwner when I use RadWindow.Confirm(dialogParameters) to show the dialog?

I tried defining the Owner and the WindowStyle (in which I defined the WindowStartupLocation property to CenterOwner) but it did not work out on my computer.

I did search in Telerik documentation and this forum but did not find any clue. Did I do it correctly or is it a bug already known? How can I get around it?

Thanks in advance,
Stephen

*** Edit

Found the same issue already posted: http://www.telerik.com/community/forums/wpf/window/alert-confirm-multi-monitor-problem.aspx
Dani
Telerik team
 answered on 30 Mar 2011
2 answers
82 views
Hi,

I have a tree view control and in the data template of some of the nodes I have a text box to allow editing of internal settings. This works perfectly except for in two respects,

1) if you try and select text within the text box with the mouse it starts a drag of the tree item. I would like a way to have the tree ignore the drag when the text box is the clicked on control.. If I return handled from the PreviewDragStarted event then the selection of text works correctly but I am unsure of a way to distinguish at this point where the original click occurred

2) where I have more than one textbox in a data template I would like clicking 'tab' to move me to the next textbox, not the tree control itself/next control on page. I have played with the KeyboardNavigation.TabNavigation settings but not found anything that worked..

any thoughts appreciated.
Petar Mladenov
Telerik team
 answered on 30 Mar 2011
1 answer
78 views
i have a radwindow with this options

<telerik:RadWindow x:Name="windowDetalhesPrevisao"
                           Header="Detalhes do Lançamento da Previsão"
                           Grid.Row="3">

a simple grid with this options

             <telerik:RadWindow.Content>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="35" />
                        <RowDefinition Height="25" />
                        <RowDefinition Height="25" />
                        <RowDefinition />
                    </Grid.RowDefinitions>

and other things ... stackpanel...

finally, a radgridview

<telerik:RadGridView x:Name="GridDadosPrevisao"
                                         Grid.Row="3"
                                         HorizontalAlignment="Left"
                                         AutoGenerateColumns="True"
                                         IsReadOnly="True"
                                         FrozenColumnCount="2"
                                         ShowGroupPanel="False"
                                         CanUserReorderColumns="False"
                                         CanUserResizeColumns="False"
                                         CanUserSortColumns="False"                                                
                                         IsFilteringAllowed="False"
                                         Margin="5">
                    </telerik:RadGridView>

my problem is, this radgrid view dont create the scrollbar Horizontal first time,
but, when i close the window and open again, this radgridview create!

2 links with screenshot

first
http://img840.imageshack.us/i/24050593.jpg/

second
http://img850.imageshack.us/i/25696953.jpg/

see?
when i open the window, scrollbar dont be there and
the radgridview stay "CUT", incomplete.

when i close and open again, scrollbar be there, complete!

why?
what happens?

sorry for english
i am starter with english
i am from brazil!

thx guys!
Yana
Telerik team
 answered on 30 Mar 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?