or
01.
void
RequestEditors(
object
sender, Telerik.WinControls.UI.PropertyGridEditorRequiredEventArgs e)
02.
{
03.
PropertyGridItem item = e.Item
as
PropertyGridItem;
04.
if
(item.PropertyType ==
typeof
(DPDouble))
05.
{
06.
e.EditorType =
typeof
(DPDoubleEditorNew);
07.
}
08.
09.
}
public
class
DPDoubleEditorNew : BaseTextBoxEditor
{
private
DPDouble internalvalue;
public
override
object
Value
{
get
{
BaseTextBoxEditorElement element =
this
.EditorElement
as
BaseTextBoxEditorElement;
double
myval;
if
(
double
.TryParse(element.Text,
out
myval))
{
internalvalue.SetValueAuto(myval);
}
return
internalvalue;
}
set
{
internalvalue = (DPDouble)value;
base
.Value = internalvalue;
}
}
}
public
event
PropertyChangedEventHandler PropertyChanged;
public
void
RaisePropertyChanged(String info)
{
if
(PropertyChanged !=
null
)
{
PropertyChangedEventArgs args =
new
PropertyChangedEventArgs(info);
PropertyChanged(
this
, args);
}
}
PropertyGrid.PropertyChanged +=
new
PropertyChangedEventHandler(PropertyGrid_PropertyChanged);
// Create mapping.
SeriesMapping newMapping =
new
SeriesMapping();
// Create series definition.
StepLineSeriesDefinition series =
new
StepLineSeriesDefinition();
newMapping.SeriesDefinition = series;
newMapping.ItemsSource = items;
newMapping.ItemMappings.Add(
new
ItemMapping(xAxisCategoryKey, DataPointMember.XCategory));
newMapping.ItemMappings.Add(
new
ItemMapping(yAxisKey, DataPointMember.YValue));
// Add mapping to chart.
this
._radChart.SeriesMappings.Add(newMapping);
01.
OlapSetCondition condition = new OlapSetCondition();
02.
condition.Comparison = Telerik.Pivot.Core.Filtering.SetComparison.DoesNotInclude;
03.
condition.Items.Add("[accnt].&[ABC]");
04.
AdomdFilterDescription filterDescription = new AdomdFilterDescription();
05.
filterDescription.MemberName = "[accnt]";
06.
filterDescription.Condition = condition;
07.
08.
pivot.AdomdDataProvider.BeginInit();
09.
pivot.AdomdDataProvider.FilterDescriptions.Add(filterDescription);
10.
pivot.AdomdDataProvider.ConnectionSettings = connectionSettings;
11.
12.
pivot.AdomdDataProvider.EndInit();
13.
pivot.MainGrid.DataProvider = pivot.AdomdDataProvider;
14.
pivot.FieldList.DataProvider = pivot.AdomdDataProvider;
<telerik:RadGridView Grid.Row="1" Margin="10" Name="radGridViewScheduleLines" ItemsSource="{Binding ScheduleLines}" AutoGenerateColumns="False" IsFilteringAllowed="False" ShowGroupPanel="False"> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn DataMemberBinding="{Binding TeamMemberName}" Header="Team Member" CellStyle="{StaticResource TeamMemberColumnStyle}" IsSortable="False" /> |
<telerik:GridViewDataColumn DataMemberBinding="{Binding JobCode}" Header="Code" IsSortable="False" /> |
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding SundayStartDaySegment, Mode=TwoWay}" IsSortable="False" ItemsSource="{Binding DaySegments}" DisplayMemberPath="DisplayStart" Width="50"> |
<telerik:GridViewComboBoxColumn.Header> |
<StackPanel> |
<TextBlock Text="Sun 2/28 Start" |
TextWrapping="Wrap"/> |
</StackPanel> |
</telerik:GridViewComboBoxColumn.Header> |
</telerik:GridViewComboBoxColumn> |
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding SundayEndDaySegment, Mode=TwoWay}" IsSortable="False" ItemsSource="{Binding DaySegments}" DisplayMemberPath="DisplayEnd" Width="50"> |
<telerik:GridViewComboBoxColumn.Header> |
<StackPanel> |
<TextBlock Text="Sun 2/28 End" |
TextWrapping="Wrap"/> |
</StackPanel> |
</telerik:GridViewComboBoxColumn.Header> |
</telerik:GridViewComboBoxColumn> |
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding MondayStartDaySegment, Mode=TwoWay}" IsSortable="False" ItemsSource="{Binding DaySegments}" DisplayMemberPath="DisplayStart" Width="50"> |
<telerik:GridViewComboBoxColumn.Header> |
<StackPanel> |
<TextBlock Text="Mon 3/1 Start" |
TextWrapping="Wrap"/> |
</StackPanel> |
</telerik:GridViewComboBoxColumn.Header> |
</telerik:GridViewComboBoxColumn> |
</telerik:RadGridView.Columns> |
</telerik:RadGridView> |