Telerik Forums
UI for WPF Forum
5 answers
229 views
I have a user control with a RadDataForm. It has a button that is bound to a command that calls radDataForm.AddNewItem().

I'm using the control in two places. In one of them things are working fine. In the other, AddNewItem() is returning false.

Clearly I am doing something wrong, but I'm having the hardest time figuring out what.

Is there anyplace I could look to figure out exactly why AddNewItem() is deciding not to add a new item?  Is there some way of turning on some sort of logging trace?
Maya
Telerik team
 answered on 07 Feb 2013
1 answer
181 views
I am adding annotations to ChartView and one of the required functionality is to drag the annotations, how can I get hold of the ChartViews Canvas inorder to use implement my own drag functionallity. If not, is there any other way to do this?

Thanks

Petar Kirov
Telerik team
 answered on 07 Feb 2013
3 answers
426 views
Hello,

I have a gridview with the set of columns shown below.  The first two columns have AggregateFunctions (sum).  I have a third column which should be the the result of dividing VacantSpaceRentableArea by TotalArea. I need this to be inside a custom aggregate function as the totals need to be recalculated as users group data by different columns. 

I have seen the examples of custom aggregate functions but all the examples I have seen refer only one column.  Is there any way to implement a custom aggregate function that references more than one column?

Thanks.

Edwin


<

 

 

telerik:GridViewDataColumn Header="Total Area" DataMemberBinding="{Binding TotalArea}" IsReadOnly="True"  DataFormatString="N0">

 

 

 

 

    <telerik:GridViewDataColumn.AggregateFunctions>

 

 

 

 

        <telerik:SumFunction Caption="Total Area: "/>

 

 

 

 

    </telerik:GridViewDataColumn.AggregateFunctions>

 

 

 

 

</telerik:GridViewDataColumn>

 

 

 

 

<telerik:GridViewDataColumn Header="Vac. Space Rentable Area" DataMemberBinding="{Binding VacantSpaceRentableArea}" IsReadOnly="True" DataFormatString="N0">

 

 

 

 

    <telerik:GridViewDataColumn.AggregateFunctions>

 

 

 

 

        <telerik:SumFunction Caption="Total Rentable Area: "/>

 

 

 

 

    </telerik:GridViewDataColumn.AggregateFunctions>

 

 

 

 

</telerik:GridViewDataColumn>

 

 

 

 


<
telerik:GridViewDataColumn Header="Vac. % Based on Rentable Area" DataMemberBinding="{Binding VacancyPctOfRentableArea}" IsReadOnly="True" DataFormatString="P2">

 

 

 

 

<!-- Need custom aggregate function here that will calculate VacantSpaceRentableArea / TotalArea -->

 

 

 

 

</telerik:GridViewDataColumn>

 

Andy
Top achievements
Rank 1
 answered on 06 Feb 2013
7 answers
241 views
Hi, so I'm in this event I need the old value to do some evaluation, but instead, I get the NewValue on both objects:

private void treeViewExperimentExplorer_Edited(object sender, RadTreeViewItemEditedEventArgs e) 
    string newName = e.NewValue.ToString(); 
    string oldName = e.OldValue.ToString(); 

In there both newName and oldName have the new value. How can I get the previous value in there?

Thanks!
Albert
Top achievements
Rank 1
 answered on 06 Feb 2013
1 answer
167 views
Hi, all!
I have a task to display document from html in RadRichTextBox, but without any working links, with prevention of loading smth. from internet (for example displaying images with url source) and disabling any script. How can I reach this purpose?
I tried HtmlFormatProvider.Import() with RadDocument , and HtmlDataProvider in XAML. Please help.
Yulia.
Petya
Telerik team
 answered on 06 Feb 2013
1 answer
104 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
117 views
Is it possible to export a chartview to excel?
Petar Kirov
Telerik team
 answered on 06 Feb 2013
1 answer
129 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
123 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
153 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
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?