Telerik Forums
UI for WPF Forum
1 answer
89 views
hi,

How can i write report title which is exported from Gridview in excel format?

Thanks in advance...

Regards,
Yasser
Pavel Pavlov
Telerik team
 answered on 09 May 2012
3 answers
109 views
Gap between content image & its text is not correctly shown in html...
Mihail
Telerik team
 answered on 09 May 2012
9 answers
588 views

Hello Telerik,

This is probably a silly question with an obvious answer - but I am having issues with my CellTemplate content binding...
<telerik:RadGridView x:Name="GridViewDetailAC"
                AutoGenerateColumns="False"
                AlternateRowBackground="White"
                AlternationCount="2"
                AllowDrop="True"
                CanUserSelect="True"
                CanUserDeleteRows="False"
                CanUserInsertRows="False"
                CanUserResizeColumns="True"
                EditTriggers="None"
                Grid.Row="1"
                Grid.Column="0"
                Grid.ColumnSpan="4"
                HorizontalGridLinesBrush="SlateGray"
                ItemsSource="{Binding XXXX}"
                RowIndicatorVisibility="Collapsed"
                RowHeight="26"
                SelectedItem="{Binding Path=SelectedXXXX,
                                NotifyOnSourceUpdated=True
                                UpdateSourceTrigger=PropertyChanged}"
                SelectionMode="Single"
                SelectionUnit="FullRow"                                                                    
                ShowColumnFooters="False"
                ShowGroupPanel="False"
                ShowColumnHeaders="True"
                VerticalGridLinesBrush="Transparent">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="Vendor"
                            Width="Auto"
                            TextAlignment="Left"
                            IsVisible="{Binding ElementName=ckbVendorVisi,
                                          Path=IsChecked,
                                          FallbackValue=0}">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <DockPanel>
                        <Label Content="{Binding Path=LV_Name, FallbackValue=''}"
                             Visibility="{Binding Path=NotNewRecord,
                                            FallbackValue=0,
                                            Converter={StaticResource BoolVisiRevConv2}}"/>
                        <TextBox  Text="{Binding Path=LV_Name, FallbackValue=''}"
                              Visibility="{Binding Path=NotNewRecord,
                                             FallbackValue=0,
                                             Converter={StaticResource BoolVisiConv2}}"/>
            </DockPanel>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

The above piece of code, using MVVM, produces a 'System.Windows.Data Information XX' errors - Three to be exact: 41, 20, 21 for each ViewModel property binding.
System.Windows.Data Information: 41 : BindingExpression path error: 'LV_Name' property not found for 'object' because data item is null.  This could happen because the data provider has not produced any data yet. BindingExpression:Path=LV_Name; DataItem=null; target element is 'Label' (Name=''); target property is 'Content' (type 'Object')
System.Windows.Data Information: 20 : BindingExpression cannot retrieve value due to missing information. BindingExpression:Path=LV_Name; DataItem=null; target element is 'Label' (Name=''); target property is 'Content' (type 'Object')
System.Windows.Data Information: 21 : BindingExpression cannot retrieve value from null data item. This could happen when binding is detached or when binding to a Nullable type that has no value. BindingExpression:Path=LV_Name; DataItem=null; target element is 'Label' (Name=''); target property is 'Content' (type 'Object')
System.Windows.Data Information: 41 : BindingExpression path error: 'NotNewRecord' property not found for 'object' because data item is null.  This could happen because the data provider has not produced any data yet. BindingExpression:Path=NotNewRecord; DataItem=null; target element is 'Label' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Information: 20 : BindingExpression cannot retrieve value due to missing information. BindingExpression:Path=NotNewRecord; DataItem=null; target element is 'Label' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Information: 21 : BindingExpression cannot retrieve value from null data item. This could happen when binding is detached or when binding to a Nullable type that has no value. BindingExpression:Path=NotNewRecord; DataItem=null; target element is 'Label' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Information: 41 : BindingExpression path error: 'LV_Name' property not found for 'object' because data item is null.  This could happen because the data provider has not produced any data yet. BindingExpression:Path=LV_Name; DataItem=null; target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Information: 20 : BindingExpression cannot retrieve value due to missing information. BindingExpression:Path=LV_Name; DataItem=null; target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Information: 21 : BindingExpression cannot retrieve value from null data item. This could happen when binding is detached or when binding to a Nullable type that has no value. BindingExpression:Path=LV_Name; DataItem=null; target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Information: 41 : BindingExpression path error: 'NotNewRecord' property not found for 'object' because data item is null.  This could happen because the data provider has not produced any data yet. BindingExpression:Path=NotNewRecord; DataItem=null; target element is 'TextBox' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Information: 20 : BindingExpression cannot retrieve value due to missing information. BindingExpression:Path=NotNewRecord; DataItem=null; target element is 'TextBox' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Information: 21 : BindingExpression cannot retrieve value from null data item. This could happen when binding is detached or when binding to a Nullable type that has no value. BindingExpression:Path=NotNewRecord; DataItem=null; target element is 'TextBox' (Name=''); target property is 'Visibility' (type 'Visibility')

If I swap the CellTemplate out and use the DataMemberBidning property on the GridViewDataColumn then no binding error(s) occur - BUT I require the dual content hide/show feature.

I have also attempted to use the other types of GridViewColumn available but that seemed to make little difference in the outcome.

Can you help me determin why my non-null ItemsSource and its non-null properties are not being friendly with your RadGridView's columns?


Cheers,
Dimitrina
Telerik team
 answered on 09 May 2012
5 answers
167 views
Hi,
Another question,
we are working with wcf data services and the dataservicedatasource (the mvvm way - QueryableDataServiceCollectionView) with the datapager.
On certain scenarios, after adding a new item for example, we would like to set the current item in the datagrid to an item 
which may or may not be on the presented page in the pager.
 the MoveCurrentTo() method does not work if it is not on the collection of the page retrieved.

Is there an easy way to do so?
 
Thanks
Rossen Hristov
Telerik team
 answered on 09 May 2012
4 answers
134 views
Hi 
In our application which is based on wcf data services and Entity Framework, we are using the dataservicedatasource in the mvvm pattern(with the QueryableDataServiceCollectionView object) togeher with the RadDataFilter.
the filter works great in all scenarios but when trying to retrieve data based on the "equal filter" of the property which is the primary key of the table we get this exception:
 "Error translating Linq expression to URI: Cannot specify query options (orderby, where, take, skip) on single resource" (which is also the query on the loadingeventargs of the LoadingData event of the QueryableDataServiceCollectionView).
i.e. only when fetching a single data.
the Query.expression which is generated is:
Convert([10000].Where(item => (item.Company_No == 54)).Take(14)).IncludeTotalCount()

Thanks

nuritk
Top achievements
Rank 1
 answered on 09 May 2012
1 answer
148 views
hello, 
i am  trying to convert a silverlight DeepEarth project  over a geoserver into a WPF control. i have some problem trying to understand how the new WmsTiled Source work ( for example what kind of uri should i put in the string parameter?). Furthermore  i was able to connect to a GeoWebCache using this litlle class overriding  microsoft MapControl TileSource : 

public class GWCTileSource :  Microsoft.Maps.MapControl.TileSource
    {
        private const string TilePath = @"{GWC_ADDRESS}/service/gmaps?layers={L}&zoom={Z}&x={X}&y={Y}";
        private string gwc_address;
        private string layername;
 
         
        public GWCTileSource()
            : base()
        {
        }
 
        public GWCTileSource(string gwc_address, string layername)
            : base()
        {
             
            this.gwc_address = gwc_address;
            this.layername = layername;
             
        }
 
        public override Uri GetUri(int x, int y, int zoom)
        {
               string url = TilePath;
                url = url.Replace("{GWC_ADDRESS}", gwc_address);
                url = url.Replace("{L}", layername);
                url = url.Replace("{Z}", zoom.ToString());
                url = url.Replace("{X}", x.ToString());
                url = url.Replace("{Y}", y.ToString());
                return new Uri(url);
          
        }
    }

any advice on how should i proceed to manage both wms and wms through GeowebCache sources ?
Andrey
Telerik team
 answered on 09 May 2012
1 answer
339 views

We are currently developing a program using RadScheduleView. In our model any appointment can only be scheduled during user's working hours (which is user configurable).

 

Working hours can change from one day to another, and can be changed during program execution. We want it to be displayed behind other appointments (that is, in the background of RadScheduleView).

Is there an way to configure RadSchedule view background color in a cell independent way? i.e Working hours being displayed as green colored background cells while non working hours being displayed as gray colored cells, for example?

Thank you in advance,

Leandro

Dani
Telerik team
 answered on 09 May 2012
3 answers
408 views
Hi All,

I have a few classes that define the datacontext for controls in the RibbonView:

public class RibbonElement
{
    public string Text { get; set; }
    public bool IsEnabled { get; set; }
}
 
public class Tab : RibbonElement
{
    public ObservableCollection<Group> Groups { get; set; }
}
 
public class Group : RibbonElement
{
    public ObservableCollection<Button> Buttons { get; set; }
}
 
public class Button : RibbonElement
{
}

And I have several HierarchicalDataTemplates that define how the classes are visualized (modeled after the samples on this site):

    <DataTemplate x:Key="ButtonTemplate">
            <t:RadRibbonButton Text='{Binding Text}' IsEnabled='{Binding IsEnabled}' />
    </DataTemplate>
 
    <HierarchicalDataTemplate x:Key="GroupTemplate"
                              ItemsSource='{Binding Buttons}'
                              ItemTemplate='{StaticResource ButtonTemplate}'>
        <TextBlock Text='{Binding Text}' /> 
    </HierarchicalDataTemplate>
 
    <HierarchicalDataTemplate x:Key="TabTemplate"
                              ItemsSource='{Binding Groups}'
                              ItemTemplate='{StaticResource GroupTemplate}'>
        <TextBlock Text='{Binding Text}' />
    </HierarchicalDataTemplate>
</Window.Resources>
 
<t:RadRibbonView ItemsSource='{Binding Tabs}'
                 ItemTemplate='{StaticResource TabTemplate}'
                 ApplicationButtonVisibility="Hidden" />

How can I create the RadRibbonGroup/RadRibbonTab controls in the templates, instead of using a TextBlock?  I need to do this so that I can bind to IsEnabled to dynamically enable/disable groups.   The RadRibbonTab seems to take the output of the template and put it in the group header instead of the actual RadRibbonGroup control.   By contrast, the headered controls in the rest of WPF have HeaderTemplate property for headers and ItemTemplate property for items.


Tina Stancheva
Telerik team
 answered on 08 May 2012
5 answers
176 views
My company is currently looking at the possibility of combining the use of the Silverlight and the WPF RichTextBoxes (RTB).

On the client side we would have the Silverlight RTB.  It would send its XAML to the server to be saved into the database.

Then from a service the XAML would be loaded into a in-memory WPF RTB and then an image of the content would be generated.

My Question is, can the WPF RTB be used in a service that does not have an interface?  And if it can, Will I be able to create a RenderTargetBitmap of its visual?
David Hatfield
Top achievements
Rank 1
 answered on 08 May 2012
2 answers
127 views
Hi all,

how can i reach a 3D-Chart like the attached one. Thank You!
James
Top achievements
Rank 1
 answered on 08 May 2012
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?