Telerik Forums
UI for WPF Forum
2 answers
92 views

Hello,

I was wondering, is it possible to add a new document to the document host but don't immediately make that new document active/visible? To clarify, the behavior I'm looking for is like in Chrome, when you middle-click a link, it opens the link in a new tab, but doesn't switch to it, it just opens it in the background.

What I'm trying to do is allow users to quickly open multiple tabs. This is tough to do when you have to keep switching back to the original tab that triggers the new tabs.

Thanks,

Joel

JP
Top achievements
Rank 1
 answered on 28 May 2015
1 answer
132 views


   <telerik:RadGridView Name="DataGrid"
ItemsSource="{Binding Data}" ScrollViewer.CanContentScroll="True"  

                                        ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto" Grid.Row="0"

                                        IsReadOnly="True"
IsFilteringAllowed="False" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False"

                                        AutoGenerateColumns="False"   ShowColumnFooters="True"  AutoExpandGroups="True"
CanUserFreezeColumns="False"

              SelectionMode="Extended" SelectionUnit="FullRow"     ShowInsertRow="False"   CanUserInsertRows="False"
CanUserDeleteRows="False" CanUserReorderColumns="False"

                                         CanUserResizeColumns="False"
CanUserSortColumns="False"   >

 

 

                                <telerik:RadGridView.Columns>

 

 

                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Column1}" Header="Column1"   />

                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Column2}" Header="Column2" />

 

 

 

 

 

                                </telerik:RadGridView.Columns>

                                <telerik:RadGridView.GroupRowStyle>

                                    <Style TargetType="telerik:GridViewGroupRow">

                                        <Setter Property="ShowHeaderAggregates" Value="False"></Setter>

                                    </Style>

                                </telerik:RadGridView.GroupRowStyle>

                                <telerik:RadGridView.GroupHeaderTemplate>

                                    <DataTemplate>

                                        <StackPanel Orientation="Horizontal" Margin="0,0" Height="45">

                                            <TextBlock Text="{Binding Group.Key}" Margin="0,0,0,2" Width="200" />

                                            <telerik:AggregateResultsList ItemsSource="{Binding AggregateResults}" VerticalAlignment="Center">

                                               
<ItemsControl.ItemTemplate>

                                                    <DataTemplate>

                                                       
<StackPanel Orientation="Vertical" VerticalAlignment="Center">

                                                           
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Caption}" Width="90" />

                                                           
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding FormattedValue}" Width="90"  />

                                                       
</StackPanel>

                                                   
</DataTemplate>

                                               
</ItemsControl.ItemTemplate>

                                                <ItemsControl.ItemsPanel>

                                                   
<ItemsPanelTemplate>

                                                       
<StackPanel Orientation="Horizontal"
/>

                                                 
  </ItemsPanelTemplate>

                                               
</ItemsControl.ItemsPanel>

                                            </telerik:AggregateResultsList>

                                        </StackPanel>

 

                                    </DataTemplate>

                                </telerik:RadGridView.GroupHeaderTemplate>

 

                                <telerik:RadGridView.GroupDescriptors>

                                    <telerik:GroupDescriptor x:Name="TransactionGroup" Member="Group1" SortDirection="Ascending"
>

                                        <telerik:GroupDescriptor.AggregateFunctions>

                                            <telerik:MinFunction SourceField="GroupHeader1"  Caption="GroupHeader1" />

                                            <telerik:MinFunction SourceField="GroupHeader2" Caption="GroupHeader2" />

                                        </telerik:GroupDescriptor.AggregateFunctions>

                                    </telerik:GroupDescriptor>

                                </telerik:RadGridView.GroupDescriptors>

 

 

                            </telerik:RadGridView>

 

 

 

 

Dimitrina
Telerik team
 answered on 28 May 2015
1 answer
155 views

Normally the pivot element has a parent and child (on expanding) and the parent is usually some kind of aggregation of all its children. I have a requirement where-in the parent should not  be an aggregation and its independent of children. Say parent has some 5000 value, upon expanding the value need not be a sum, it can be more than 5000.

 

Is this possible with Pivots or do I have to use any other controls?

Polya
Telerik team
 answered on 28 May 2015
3 answers
2.1K+ views

My Challenge:

I am trying to capture the selected row in a RadGridView which I would like to store in the database when the user exits the screen. When the user re-enters the screen I would like to programmatically select the row previously stored.

I set up a proof of concept using 2 Test buttons and a GridView:

Test 1 Button:
 - Get the selected row
 - Cast the selected row object to a string (which would be stored in the database)
 - Cast the string back to an object (simulate return from the database)
 - Add object to a list of objects
 - Clear selected items in the grid

Test 2 Button:
 - Execute the Select method on the GridView with the list of selected objects as an argument
 - Check the GridView SelectedItems count

Problem:
The select method executes but nothing happens. What am I missing? 

Sample Code:

private object rowObject = new object();
private List<object> rowList = new List<object>(); 

private void test1_Click(object sender, System.Windows.RoutedEventArgs e)
{
  if (ProjectListingGridView.SelectedItems.Count > 0)
  {
      var item = ProjectListingGridView.SelectedItem.ToString();

      if (item != null)
      {
        var rowObject = (object)item;
        rowList.Clear();
        rowList.Add(rowObject);
        }

      this.ProjectListingGridView.SelectedItems.Clear();
  }
}

private void test2_Click(object sender, System.Windows.RoutedEventArgs e)
{
  var selectList = rowList;

  try
  {
       ProjectListingGridView.Select(selectList);
  }
  catch (Exception)
  {
      throw;
  }
    var cnt = ProjectListingGridView.SelectedItems.Count;
}

Stefan
Telerik team
 answered on 28 May 2015
8 answers
519 views
The demo(GridView.WPF.Commands)  is what we want. But when I write code , I find the command is bind to "telerikGrid:RadGridViewCommands.BeginInsert" , which is compiled into Telerik.Windows.Controls.dll. It is not a custom command in viewmodel. So how can I add my custom logic (such as save to database) to these command?

your demo :
<StackPanel Orientation="Horizontal"
                    HorizontalAlignment="Center"
                    Margin="0,5,0,0">
            <telerik:RadButton Width="150"
                               Content="Delete selected rows"
                               Margin="0,0,5,0"
                               Command="telerikGrid:RadGridViewCommands.Delete"
                               CommandTarget="{Binding ElementName=RadGridView1}" />
            <telerik:RadButton Width="150"
                               Content="Add new row"
                               Margin="0,0,5,0"
                               Command="telerikGrid:RadGridViewCommands.BeginInsert"
                               CommandTarget="{Binding ElementName=RadGridView1}" />
            <telerik:RadButton Width="150"
                               Content="Save insert/edit"
                               Margin="0,0,5,0"
                               Command="telerikGrid:RadGridViewCommands.CommitEdit"
                               CommandTarget="{Binding ElementName=RadGridView1}" />
            <telerik:RadButton Width="150"
                               Content="Cancel insert/edit"
                               Command="telerikGrid:RadGridViewCommands.CancelRowEdit"
                               CommandTarget="{Binding ElementName=RadGridView1}" />
        </StackPanel>
Thomas
Top achievements
Rank 1
 answered on 28 May 2015
5 answers
85 views

Hello,

I'm missing a way to display a label for a GridLineAnnotation in a polar chart. What is the intended way to achieve this?
I would have created my own annotation type, but the necessary methods are all internal, so overriding is not possible.
Is there a reason why these are not declared as protected internal? (This would be helpful anyway, as I also also need
other annotation types which are not possible at the moment...)

Alex

Martin Ivanov
Telerik team
 answered on 28 May 2015
10 answers
1.5K+ views
Is there a way to set minimum/maximum width of RadPane. When I try to do that, that the RadPanes don't fill the complete space (see attached image). Also when I resize the window I want to be able to set RadPane's widths.

Other solution I have seen is that set the Realtive size of the RadPanes in a RadPaneGroup. However I have some windows, I want them to be of FixWidth/FixHeight, and with Resizing, I don't want them to change.

If you have an example, that illustrates different resizing options do let me know.
Kalin
Telerik team
 answered on 28 May 2015
5 answers
139 views
Hi,

Is the All day area going to be implemented in the RadScheduleView? We really need this feature because it's available in the old RadScheduler which we are porting our code from.

Best regards,
Windev
Nasko
Telerik team
 answered on 28 May 2015
4 answers
262 views

I have RadChart that populated with real time data.

private Random random;
private DataSeries series;

This is my RadChart configuration:

rcStatistics.Background = Brushes.Transparent;
rcStatistics.BorderBrush = Brushes.Transparent;
rcStatistics.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Collapsed;
rcStatistics.DefaultView.ChartArea.AxisX.Visibility = System.Windows.Visibility.Hidden;
rcStatistics.DefaultView.ChartArea.AxisY.Visibility = System.Windows.Visibility.Hidden;

My chart is populated with real time data via timer, this is my timer tick event:

int val = random.Next(0, 100);
series.Add(new DataPoint(val));
rcStatistics.DefaultView.ChartArea.DataSeries.Add(series);

Please see my attach screenshot:

1. How can i remove value label ?

2. How can i remove the upper and the lower 2 stripes that i have on my chart ?

3. As you can see my chart series line is fill only half of my chart and this is how it is all the time and in additional after adding few points into my chart my application is stuck and become more slow, why this is happening and how can i fix it ? 

 

 

Petar Marchev
Telerik team
 answered on 28 May 2015
3 answers
91 views

Hello,

 I am new to WPF. I am trying to understand the differences between UI for WPF and UI for Silverlight.

How silverlight works with WPF ?

Martin Ivanov
Telerik team
 answered on 28 May 2015
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?