Hi,
I want to add a drop down list with predefined RowGroup, ColumnGroup and Aggregate Descriptions to ease switching between different data arrangements via RadPivotFieldList.
I tried to check if I can add such descriptions to the filter list example, but I couldn't find the proper namespace for FiltersCollection and FilterItem in my application. Thus they're giving "type not found" errors. In the example they are defined as below.
...
xmlns:local="clr-namespace:Telerik.Windows.Examples.PivotGrid.Common.Filtering"
...
<local:FiltersCollection x:Key="Filters">
<local:FilterItem DisplayName="<none>" />
<local:FilterItem DisplayName="The name is in the list: 'Copy holder', 'Glare filter'.">
<local:FilterItem.GroupFilter>
<pivot:LabelGroupFilter>
...
<
telerik:RadGridView
Name
=
"rgvExplorador"
GridLinesVisibility
=
"Both"
GroupPanelBackground
=
"LightGray"
GroupPanelForeground
=
"Black"
ShowSearchPanel
=
"True"
ShowGroupPanel
=
"False"
d:LayoutOverrides
=
"Height"
Grid.Row
=
"1"
FontSize
=
"10.667"
CanUserResizeColumns
=
"False"
CanUserFreezeColumns
=
"False"
AutoGenerateColumns
=
"False"
SelectionMode
=
"Single"
ItemsSource
=
"{Binding}"
RowIndicatorVisibility
=
"Collapsed"
>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:GroupDescriptor
Member
=
"areaTexto"
SortDirection
=
"Ascending"
/>
<
telerik:GroupDescriptor
Member
=
"clasificacionTexto"
SortDirection
=
"Ascending"
/>
</
telerik:RadGridView.GroupDescriptors
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Área"
DataMemberBinding
=
"{Binding areaTexto}"
Width
=
"70"
IsReadOnly
=
"True"
IsGroupable
=
"True"
IsVisible
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"Clasificación"
DataMemberBinding
=
"{Binding clasificacionTexto}"
Width
=
"140"
IsReadOnly
=
"True"
IsGroupable
=
"True"
IsVisible
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"Título"
DataMemberBinding
=
"{Binding descripcion}"
IsReadOnly
=
"True"
TextWrapping
=
"Wrap"
Width
=
"300"
>
<
telerik:GridViewColumn.ToolTipTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Vertical"
Width
=
"300"
MinHeight
=
"80"
Background
=
"White"
>
<
TextBlock
Text
=
"Descripción:"
FontWeight
=
"Bold"
/>
<
TextBlock
Text
=
"{Binding Objetivo}"
TextWrapping
=
"Wrap"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewColumn.ToolTipTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Nº"
DataMemberBinding
=
"{Binding IdAlerta}"
IsReadOnly
=
"True"
Width
=
"auto"
IsGroupable
=
"True"
/>
<
telerik:GridViewDataColumn
x:Name
=
"colHV"
Header
=
"Info dimensional"
DataMemberBinding
=
"{Binding HvInfoDesc}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
x:Name
=
"colPatron"
Header
=
"Patrón"
DataMemberBinding
=
"{Binding HF_Referencia}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Período"
DataMemberBinding
=
"{Binding FechaDatos}"
DataFormatString
=
"{}{0:MMM/yyyy}"
Width
=
"70"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Entidad"
DataMemberBinding
=
"{Binding Entidad}"
IsReadOnly
=
"True"
Width
=
"70"
/>
<
telerik:GridViewDataColumn
IsReadOnly
=
"True"
Width
=
"30"
DataMemberBinding
=
"{Binding EsAlerta}"
IsGroupable
=
"True"
ShowDistinctFilters
=
"True"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Image
>
<
Image.Style
>
<
Style
TargetType
=
"{x:Type Image}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/Blank.png"
/>
<
Style.Triggers
>
<
DataTrigger
Value
=
"1"
Binding
=
"{Binding EsAlerta}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/WarningRed.png"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"1"
Binding
=
"{Binding AlertaPositiva}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/Warning.png"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"0"
Binding
=
"{Binding EsAlerta}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/Blank.png"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
Image.Style
>
</
Image
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
I have this radgridview. In the alert column the filter values takes out a 0 or a 1, which is the data boolean that is collected from the database.
How could I change 0 for no alert and 1 for alert?
Thank you very much
Hello,
I have used the SDK Samples browser example MonthTickProvider and obtained the CustomMonthTickProvider class to display the Month names in the GroupTickLength. On similar lines, I have managed to create Weekly tick provider that displays the Week Number and Quarter tick provider that displays the Quarter of the year. These providers alone work fine when put as GroupTickLegth.
However, I have to display Week tick provider in the MajorTickLength along with Month in GroupTickLength. The user can also switch between having Month in MajorTickLength and Quarter in GroupTickLength.
I tried the change the SDK Browser example itself and I am facing must be non-negative.
The following code block is what I am trying to achieve:
<
telerik:RadScheduleView
AppointmentsSource
=
"{Binding Appointments, Source={StaticResource ViewModel}}"
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:TimelineViewDefinition
VisibleDays
=
"365"
MinTimeRulerExtent
=
"8000"
>
<
telerik:TimelineViewDefinition.GroupTickLength
>
<
example:CustomMonthTickProvider
/>
</
telerik:TimelineViewDefinition.GroupTickLength
>
<
telerik:TimelineViewDefinition.MajorTickLength
>
<
example:WeeklyTickProvider
/>
</
telerik:TimelineViewDefinition.MajorTickLength
>
</
telerik:TimelineViewDefinition
>
</
telerik:RadScheduleView.ViewDefinitions
>
</
telerik:RadScheduleView
>
If we replace the MajorTickLength with the same provider as in GroupTickLength, then there is no exception raised.
Here are my Week and Quarter provider classes
public class WeeklyTickProvider : ITickProvider
{
public string GetFormatString(IFormatProvider formatInfo, string formatString, DateTime currentStart)
{
var weekNumber = GetWeekNumber(formatInfo as CultureInfo, currentStart);
return string.Format(formatInfo, "Week {0}", weekNumber);
}
private static int GetWeekNumber(CultureInfo formatInfo, DateTime currentStart)
{
var cultureInfo = formatInfo as CultureInfo;
if (cultureInfo != null)
{
return cultureInfo.Calendar.GetWeekOfYear(currentStart, cultureInfo.DateTimeFormat.CalendarWeekRule, cultureInfo.DateTimeFormat.FirstDayOfWeek);
}
return 0;
}
public DateTime GetNextStart(TimeSpan pixelLength, DateTime currentStart)
{
var currentDate = currentStart.Date;
var weekStart = CalendarHelper.GetFirstDayOfWeek(currentStart, DayOfWeek.Monday);
if (weekStart == currentDate)
{
return weekStart.AddDays(7);
}
return weekStart;
}
}
public class QuarterTickProvider : ITickProvider
{
public string GetFormatString(IFormatProvider formatInfo, string formatString, DateTime currentStart)
{
if (currentStart.Month >= 10)
{
return "Quarter 4";
}
else if (currentStart.Month >= 7)
{
return "Quarter 3";
}
else if (currentStart.Month >= 4)
{
return "Quarter 2";
}
else if (currentStart.Month >= 1)
{
return "Quarter 1";
}
return string.Empty;
}
public DateTime GetNextStart(TimeSpan pixelLength, DateTime currentStart)
{
if (currentStart.Month >= 10)
{
return new DateTime(currentStart.Year + 1, 1, 1);
}
else if (currentStart.Month >= 7)
{
return new DateTime(currentStart.Year, 10, 1);
}
else if (currentStart.Month >= 4)
{
return new DateTime(currentStart.Year, 7, 1);
}
else if (currentStart.Month >= 1)
{
return new DateTime(currentStart.Year, 4, 1);
}
return DateTime.Today;
}
Another thing I noticed is that in the above , if I set GroupTick as month and MinorTick as , then there is no exception raised, But the desired output is not achieved.
Is there any way I could provide both GroupTickLength and MajorTickLength as my own custom tick providers. I have spent a lot of time to find a way but did not achieve the desired result.
Hello everyone! I need zoom from years to months, months to days, days to hours, hours to minutes. But with this XAML snippet:
<
telerik:RadTimeline
PeriodStart
=
"01/01/2010"
PeriodEnd
=
"01/01/2015"
StartPath
=
"Date"
DurationPath
=
"Duration"
>
<
telerik:RadTimeline.Intervals
>
<
telerik:YearInterval
/>
<
telerik:MonthInterval
/>
<
telerik:DayInterval
/>
<
telerik:HourInterval
/>
<
telerik:MinuteInterval
/>
</
telerik:RadTimeline.Intervals
>
</
telerik:RadTimeline
>
I can't see hours and minutes. Maximum zoom is day. How can I do that, if my maximum period will be 5 years?
Sorry for my poor English. I'm from Russia...
We are using the RadCartesianChart in our WPF project. We are experiencing an issue where the chart does not show zero. Our range of numbers goes from 0 to 22,000 and back down to 0 but always ends with a zero. The chart will plot the data correctly, but when the last value is a single zero, it will not end at zero. It does not always do this, but enough that it is causing a problem for our end users who need to see that zero plot point. As a work around, we are adding zeros to the data set and that will resolve the problem.
As an example, if our values being plotted looks like this:
0,100,1000,2000,5000,12000,15000,15000,15000,15000,15000,15000,15000,7000,2500,0
The charts does not drop all the way down to zero. But if we add zeros to the end of the dataset, like this....
0,100,1000,2000,5000,12000,15000,15000,15000,15000,15000,15000,15000,7000,2500,0,0,0
....the chart line will drop down to zero.
Is there a way to make the chart reflect the true values - or at least "snap" to the beginning and end values?
Thank you for your help!
I'm using RadCartesianChart with a HorizontalAxis of DateTimeContinuousAxis and VerticalAxis of LineSeries. I have ~130,000 points with Value = double? and Category = DateTime. The issue I am having is that I cannot zoom in far enough to show the individual points. I have tried setting PanAndZoomBehavior.DragToZoomThreshold = 0.1; but that does not help. The zoom appears to be limited elsewhere. Thanks for your help.
I have confirmed and unconfirmed project in Categories.
How can I change Category in Custom Appointment Dialog?
-Jacky
Hi all,
In our app, which uses a RibbonWindow and RibbonView, we have some RibbonTabs that are contextual to the currently open workspace, buttons on these tabs are visible only to the users that have the specific security rights for the command it's bound to. These contextual RibbonTabs and their content are defined in the MainWindow xaml file, each button's visibility is databound via a converter to a CanDoThisOrThat bool property of the current workspace, the button's Command is also bound to an ICommand of the current Workspace. When a workspace is initialized, it reads the security rights of the user and set's the CanDoThisOrThat property which is then used to set the Visibility of the button.
So, our issue now it that depending on the security rights of the user, some RibbonGroups are left empty which looks kind of weird. I have tried some hacky code like hooking-up to the GotFocus event of the RibbonTab and then looping thru its Items to check for IsVisible. if none is found to be visible, the RibbonGroup's visibility is set to Collapsed. This kind of works but some RibbonTab's GotFocus event handler is never called and thus the empty groups are visible.
So my question is: Is there a way to collapse a RibbonGroup when it has no visible children?
Thank you.