Telerik Forums
UI for WPF Forum
1 answer
78 views
We're currently using the 2012 Q1 version of Telerik Controls for WPF (or at least the DLL's version number is 2012.1.326.40). I am trying to style the control with Visual Studio 2012 using the designer by copying the existing control template. The RadDataPager's NumericElementsPresenter has a white background that we would rather have as transparent.

Unfortunately, every time I try to edit the existing template/style for the NumericElementsPresenter (and set the style tag to point to the resource) all of the buttons disappear and/or it starts using the Office theme instead of Metro. It also appears that the Metro theme colors are not being used, and I do not want to manually replace all of those colors in the template.

Is there a way to remove the white background from the NumericElementsPresenter and/or successfully create a copy of the current Metro template? Ideally the background would use a templatebinding and inherit the control's background instead.
Vanya Pavlova
Telerik team
 answered on 06 Feb 2013
1 answer
93 views
Is it possible to export a chartview to excel?
Petar Kirov
Telerik team
 answered on 06 Feb 2013
1 answer
106 views
I am no expert in WPF.  I have only been using it for a year or so and I probably don't use all the proper techniques.  However I have come across a few things I just can NOT get resolved with the gridview.

Scenario:
Grid A contains documents
Grid B is a hierarchical grid that contains transactions and documents that are associated to the transactions.

1) I want to be able to do drag and drop between two grids.  I found a few sample that seemed to work to do this but nothing like what I need.  All the samples seemed to revolve around reordering or something of that nature.  What I need to do is drag a row from my document grid and associate it to a transaction in Grid B.  I can't seem to find any examples that show the capture of the row that the source is being dropped on.  This is required in order for me to be able to know which transaction to associate the document to.  Can someone please provide an example of this?

2) In Grid B, I need to be able to select a row in the child grid and remove it.  I have created a context menu on the child grid, but I had a devil of a time trying to figure out which row(s) were selected in the child grid.  I ended up listening for the contextmenuOpen and contextmenuClose events for the child grid and setting a member variable to the selectedItems in the open and back to null on the close.  Is there a better way to do this?

public static RoutedCommand RemoveRemitDocCommand = new RoutedCommand();
private ObservableCollection<object> selectedItems = null;
private void gvwChildDocs_ContextMenuOpening(object sender, ContextMenuEventArgs e)
{
    selectedItems = ((RadGridView)sender).SelectedItems;
}
  
private void gvwChildDocs_ContextMenuClosing(object sender, ContextMenuEventArgs e)
{
    selectedItems = null;
  
}
  
private void RemoveRemitDoc_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
    e.CanExecute = (selectedItems != null);
    e.Handled = true;
}
  
private void RemoveRemitDoc_Executed(object sender, ExecutedRoutedEventArgs e)
{
   //Do Something
}

3) I need to be able to set a converter on my GridB for the background of the row.  At first I wanted to just set the color if there were documents associated to the transaction.  I did this by binding the collection on the transaction to the converter value and in the converter I checked the count > 0 and returned a color accordingly.  This worked fine.  But of course you know how managers are.  Now they want to check the amounts from the documents vs the amount of the transaction.  So I bound the RelativeSource =self to the converter and changed my logic accordingly.  However, now the converter is called and works perfectly the first time, but if you sort the grid or filter it, then the converter is not called for the new order of rows and the colors are all wrong.  here is my code:
Xaml:
<telerik:RadGridView.RowStyle>
                    <Style TargetType="telerik:GridViewRow">
                        <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Self},Converter={StaticResource DocColorConverter}}"></Setter>
                    </Style>
                </telerik:RadGridView.RowStyle>
Converter:
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            bankTransaction bt = ((GridViewRow)value).Item as bankTransaction;
            if (bt.transactionDocuments.Count > 0)
            {
                decimal tot = bt.transactionDocuments.Select(i => i.amtOwed).Sum();
 
                if (tot == bt.amount)
                    return new SolidColorBrush(Colors.LightGreen);
                else if (tot < bt.amount)
                    return new SolidColorBrush(Colors.Yellow);
                else
                    return new SolidColorBrush(Colors.Red);
            }
            else
                return new SolidColorBrush(Colors.Transparent);
        }

Those are my three problems and I need any and all help available.  Examples work best for me or corrections to my code above.  Either way is great.
Nick
Telerik team
 answered on 06 Feb 2013
3 answers
100 views

 

Hi,

I use this component, and found a serious navigation bug , I'd love if you tell me that the problem is in my use and way to solve it.
The the side items hiding the items in front of them. A little hard to explain in words, attached a picture.

Thanks,
Harri.
Harri
Top achievements
Rank 1
 answered on 06 Feb 2013
4 answers
99 views
Hi, Thanks All Telerik Developer Team For Great Control.

I'm try SalesDashboard source open wlth Blend and Visual Studio not show pages please see screenshot.

Thanks So Much.
Stanislav
Telerik team
 answered on 06 Feb 2013
1 answer
81 views
Why is it so hard to close a radWindow using a radButton? Both are Telerik controls and shouldn't it be simple?
It seems like the RadWindow couldn't be closed using conventional Javascript means like window.close(). I thought Telerik is supposed to make these things simple..

<script  type="text/javascript" language="javascript">
    function closeWindow() {
        window.close();
    }
</script>
<td align="right" width="10%">
    <telerik:RadButton ID="RadButton1" runat="server" Width="80px" Text="Cancel" AutoPostBack="false" OnClientClicked="closeWindow"></telerik:RadButton>
</td>
Yana
Telerik team
 answered on 06 Feb 2013
10 answers
341 views
I need to write a custom control for the RadGridView which would contain a button to export the records to an Excel.
Making use of the .ToHTML method this is possible. But since the same functionality is to be replicated across the application may be a custom control would be appropriate.
Does anyone has any sample to head start on creating a custom control for RadGridView.
Nedyalko Nikolov
Telerik team
 answered on 06 Feb 2013
4 answers
275 views
Hey,

I have a scenario where we do not know the column names or data types until run-time.

We would like to be able to use data virtualization in this scenario.  Basically we construct the sql statement at run-time once we query the table for its metadata (columns).  We could add an orderby, since the VirtualQueriableCollectionView needs one. 

The question is: without pre-loading everything from the table into the VirtualQueriableCollectionView (which would defeat the purpose of this view) how do we wire our sql statement into a VirtualQueriableCollectionView.

We studied this example: GridView -> Databinding -> Various Data Sources example -> Dynamic Data

This example solves the issue of dynamically generating columns that aren't hard-coded in a model, but doesn't show how one could hook this type of solution into data virtualization.
Austin
Top achievements
Rank 1
 answered on 05 Feb 2013
1 answer
126 views
Hi,

I am using version: 2012.1.0215

There is a memory leak in GridViewLoadingIndicator and when i logged ticket it was told to me to replace it with RadBusyIndicator (by changing the GridView's template in expression blend). I did it, i replace GridViewLoadingIndicator with RadBusyIndicator. But, now the problem is RadBusyIndicator is not showing up on the grid. When i looked at the sources of RadGridView the PART_GridViewLoadingIndicator as getting cast to GridViewLoadingIndicator, in this case it would be null. 

Question is how to replace GridViewLoadingIndicator with RadBusyIndicator in GridView?

(upgrading to newer release is not an option at this time of release in our project).


Thanks
Santosh
 



Santosh kumar
Top achievements
Rank 1
 answered on 05 Feb 2013
1 answer
200 views
LineSeries Stroke color is ignored if RadCartesianChart is used in the DataTemplate.
In the example below both charts should look identical.
Telerik.Windows.Controls.Chart.dll version 2012.3.1129.40

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Charts = new ObservableCollection<ChartItemsHolder>();
            Chart = new ChartItemsHolder();
            Chart.Items = new ObservableCollection<ChartItem>();
            for (int j = 0; j < 10; j++)
            {
                Chart.Items.Add(new ChartItem() { Value1 = 20 * j, Value2 = DateTime.Now.Ticks * j });
            }
            Charts.Add(Chart);
            DataContext = this;
 
        }
 
        public ObservableCollection<ChartItemsHolder> Charts { get; set; }
        public ChartItemsHolder Chart { get; set; }
    }
 
    public class ChartItemsHolder
    {
        public ObservableCollection<ChartItem> Items { get; set; }
    }
 
    public class ChartItem
    {
        public DateTime TimeStamp { get; set; }
        public double Value1 { get; set; }
        public double Value2 { get; set; }
    }

<Grid>
    <Grid.RowDefinitions>
      <RowDefinition />
      <RowDefinition />
    </Grid.RowDefinitions>
    <TabControl Grid.Row="0" ItemsSource="{Binding Charts, Mode=OneWay}">
      <TabControl.ContentTemplate>
        <DataTemplate>
          <chart:RadCartesianChart Grid.Column="3" EmptyContent="">
            <chartView:LineSeries Stroke="Red" ValueBinding="Value1" ItemsSource="{Binding Items}">
              <chartView:LineSeries.VerticalAxis>
                <chartView:LinearAxis Title="Value1" LabelFormat="F2"
                                      ElementBrush="Red"
                                      HorizontalLocation="Right" />
              </chartView:LineSeries.VerticalAxis>
            </chartView:LineSeries>
            <chartView:LineSeries Stroke="Gold" ValueBinding="Value2" ItemsSource="{Binding Items}">
              <chartView:LineSeries.VerticalAxis>
                <chartView:LinearAxis Title="Value2" LabelFormat="F0"
                                      ElementBrush="Gold"
                                      HorizontalLocation="Left" />
              </chartView:LineSeries.VerticalAxis>
            </chartView:LineSeries>
            <chart:RadCartesianChart.HorizontalAxis>
              <chartView:CategoricalAxis Visibility="Collapsed" />
            </chart:RadCartesianChart.HorizontalAxis>
          </chart:RadCartesianChart>
        </DataTemplate>
      </TabControl.ContentTemplate>
    </TabControl>
     
    <chart:RadCartesianChart Grid.Row="1" EmptyContent="d" DataContext="{Binding Chart}">
      <chartView:LineSeries  Stroke="Red" ValueBinding="Value1" ItemsSource="{Binding Items}">
        <chartView:LineSeries.VerticalAxis>
          <chartView:LinearAxis Title="Value1" LabelFormat="F2"
                                ElementBrush="Red"
                                HorizontalLocation="Right" />
        </chartView:LineSeries.VerticalAxis>
      </chartView:LineSeries>
      <chartView:LineSeries  Stroke="Gold"  ValueBinding="Value2" ItemsSource="{Binding Items}">
        <chartView:LineSeries.VerticalAxis>
          <chartView:LinearAxis Title="Value2" LabelFormat="F0"
                                ElementBrush="Gold"
                                HorizontalLocation="Left" />
        </chartView:LineSeries.VerticalAxis>
      </chartView:LineSeries>
      <chart:RadCartesianChart.HorizontalAxis>
        <chartView:CategoricalAxis Visibility="Collapsed" />
      </chart:RadCartesianChart.HorizontalAxis>
    </chart:RadCartesianChart>
  </Grid>

Missing User
 answered on 05 Feb 2013
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?