Telerik Forums
UI for WPF Forum
1 answer
158 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
206 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.2K+ 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
571 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
143 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.6K+ 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
176 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
326 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
130 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
0 answers
130 views

Hi,

i bound a Collection "MergeItems" to a RadGridView. Now we have to press a button to check each row in the Grid. After checking and
updating the database how do i set the background of the row, for example, green?

Thanks
Best Regards

ITA
Top achievements
Rank 1
 asked on 28 May 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?