Hello All,
I have a quick and easy question about setting up a cell datatemplate. I have a class that has two properties: a boolean value and a string value. In my app, I have created a collection of this class and would like to display it in a grid. I would like to display the boolean value as either a check-mark or a x-mark as in the example image I've attached... I'm pretty sure this can and should be done as a celldatatemplate, but I have no idea as to where to start... Could someone please point me in the right direction??? Is there a good example of this or is there a good explanation of setting a template up somewhere out there???
Thanks in advance,
Kevin Orcutt
I've got some weird behaviour going on, its probably something I've done, but I can't seem to work out whats going on.
I've set up two stack panels on my usercontrol, one called New Trip and one called New Misc Job - on initialize of the usercontrol I'm setting up the DragDropManager - actually all I'm doing is specifying the methods for DragIntialize like so :
DragDropManager.AddDragInitializeHandler(newTripDrag, NewTripDragInitialize);
DragDropManager.AddDragInitializeHandler(newJobDrag, NewMiscDragInitialize);
When the user drags one of the stackpanels onto the scheduleview, I've got some custom dragdropbehaviour going on, but at the end of the Drop method, it always calls base.Drop() and this is where the weird behaviour comes in, when I'm dragging a trip, it works perfectly and the trip is selected afterwards, but when I drag a misc job, it fires off the SelectedAppointment method with a null value which makes nothing selected afterwards.
Why would it be calling the SelectedAppointment for one and not the other, is there something I can change to stop this from happening, I've attached the Call Stack from the point of base.Drop() to Setting the SelectedAppointment for when I dragged a Misc Job (if that helps).
So I seem to have a memory leak. I am using JustTrace and Memory Profiler. What happens is in using the RadListBox on one of my views, I see InternalScope objects keep adding up everytime I open the view that has that RadListBox. But I don't know what that class is used for or what would make that problem? Any detailed help on how to find the root of this problem would be appreciated. Been trying to figure it out for days and have commented out templates and styles.
Hi!
I would like to suggest that page numbers and a page title be optionally added when exporting a GridView to Pdf. This should be easy to implement since RadSpreadProcessing already has a class "HeaderFooterSettings". Just expand the "GridViewPdfExportOptions" with two options: ShowPageNumbers (true/false) and PageTitle (string). Should be done in no time.
Regards
Heiko
I had browsed for a similar issue & seen the below link which had the same issue of mine, its said by Telerik that issue is resolved but I could not get the fix anywhere.
http://www.telerik.com/forums/radwindow-autosize-on-runtime#e9i78SNv102TDO2DCh_z6g
I have created a RadWindow and its content is set to a wpf view which has some controls & a RadExpander. I want this RadExpander to be shown when its expanded(my RadWindow Width should be resized accordingly).
I have set ResizeMode="NoResize" and SizeToContent="True" for my RadWindow. But RadWindow doesn't seem to adjust according to its content, how can I achieve It?(I have not set any Height or Width to my RadWindow)
Is SizeToContent changed to Enum to support WidthAndHeight or what is the fix for the problem given??
Hi,
I'm talking about class "Slot" in Telerik.Windows.Controls.ScheduleView namespace.
Let's take a look to Slot(IOccurrence occurence) constructor, line 14 may cause NullReferenceException:
01.
public
Slot(IOccurrence occurence) :
base
(occurence)
02.
{
03.
IAppointment appointment = occurence
as
IAppointment;
04.
if
(appointment !=
null
)
05.
{
06.
if
(appointment.RecurrenceRule !=
null
)
07.
{
08.
this
.RecurrencePattern = appointment.RecurrenceRule.Pattern;
09.
}
10.
}
11.
else
12.
{
13.
Occurrence occurrence = occurence
as
Occurrence;
14.
appointment = occurrence.Appointment;
15.
if
(occurrence !=
null
)
16.
{
17.
appointment = occurrence.Appointment;
18.
}
19.
}
20.
this
.TimeZone = appointment.TimeZone;
21.
this
.Resources.AddRange(appointment.Resources);
22.
}
Using the sample below, how would I get the "VendorName" property to display next to the values of each series in the trackball info popup, just like it would appear in the legend?
<
telerik:RadCartesianChart
x:Name
=
"chart"
Palette
=
"Summer"
Height
=
"209"
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CategoricalAxis
></
telerik:CategoricalAxis
>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
HorizontalAlignment
=
"Right"
></
telerik:LinearAxis
>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTrackBallBehavior
ShowTrackInfo
=
"True"
ShowIntersectionPoints
=
"True"
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:RadCartesianChart.SeriesProvider
>
<
telerik:ChartSeriesProvider
Source
=
"{Binding ElementName=window1, Path=vendorSalesByYear}"
>
<
telerik:ChartSeriesProvider.SeriesDescriptors
>
<
telerik:CategoricalSeriesDescriptor
ItemsSourcePath
=
"Data"
ValuePath
=
"Sales"
CategoryPath
=
"MonthName"
>
<
telerik:CategoricalSeriesDescriptor.Style
>
<
Style
TargetType
=
"telerik:LineSeries"
>
<
Setter
Property
=
"LegendSettings"
>
<
Setter.Value
>
<
telerik:SeriesLegendSettings
Title
=
"{Binding VendorName}"
/>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"TrackBallInfoTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
StackPanel
Background
=
"White"
>
<
StackPanel
Orientation
=
"Horizontal"
Background
=
"Transparent"
>
<
TextBlock
Text
=
"{Binding VendorName}"
/>
<
TextBlock
Text
=
": "
/>
<
TextBlock
Text
=
"{Binding Path=DataPoint.Value, StringFormat=N0}"
/>
</
StackPanel
>
</
StackPanel
>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:CategoricalSeriesDescriptor.Style
>
</
telerik:CategoricalSeriesDescriptor
>
</
telerik:ChartSeriesProvider.SeriesDescriptors
>
</
telerik:ChartSeriesProvider
>
</
telerik:RadCartesianChart.SeriesProvider
>
</
telerik:RadCartesianChart
>
<
telerik:RadLegend
Items
=
"{Binding LegendItems, ElementName=chart}"
Margin
=
"5"
>
<
telerik:RadLegend.ItemsPanel
>
<
ItemsPanelTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
HorizontalAlignment
=
"Right"
/>
</
ItemsPanelTemplate
>
</
telerik:RadLegend.ItemsPanel
>
</
telerik:RadLegend
>
public
partial
class
MainWindow : Window
{
public
RadObservableCollection<VendorYearlyData> vendorSalesByYear {
get
;
set
; }
public
MainWindow()
{
vendorSalesByYear = GetSampleData();
InitializeComponent();
}
private
RadObservableCollection<VendorYearlyData> GetSampleData()
{
var result =
new
RadObservableCollection<VendorYearlyData>();
result.Add(
new
VendorYearlyData()
{
VendorName =
"Vendor A"
,
Data =
new
RadObservableCollection<SalesInfo>()
{
new
SalesInfo() { MonthName =
"Jan"
, Sales = 5 },
new
SalesInfo() { MonthName =
"Feb"
, Sales = 7 },
new
SalesInfo() { MonthName =
"Mar"
, Sales = 6 },
new
SalesInfo() { MonthName =
"Apr"
, Sales = 8 }
}
});
result.Add(
new
VendorYearlyData()
{
VendorName =
"Vendor B"
,
Data =
new
RadObservableCollection<SalesInfo>()
{
new
SalesInfo() { MonthName =
"Jan"
, Sales = 15 },
new
SalesInfo() { MonthName =
"Feb"
, Sales = 18 },
new
SalesInfo() { MonthName =
"Mar"
, Sales = 19 },
new
SalesInfo() { MonthName =
"Apr"
, Sales = 23 }
}
});
result.Add(
new
VendorYearlyData()
{
VendorName =
"Vendor C"
,
Data =
new
RadObservableCollection<SalesInfo>()
{
new
SalesInfo() { MonthName =
"Jan"
, Sales = 21 },
new
SalesInfo() { MonthName =
"Feb"
, Sales = 25 },
new
SalesInfo() { MonthName =
"Mar"
, Sales = 26 },
new
SalesInfo() { MonthName =
"Apr"
, Sales = 25 }
}
});
return
result;
}
}
public
class
SalesInfo
{
public
string
MonthName {
get
;
set
; }
public
double
Sales {
get
;
set
; }
}
public
class
VendorYearlyData
{
public
string
VendorName {
get
;
set
; }
public
RadObservableCollection<SalesInfo> Data {
get
;
set
; }
}