or
public class ClassName: WebAdminPageBase
{
public RadTreeView trvGlobalNavFooter { get; set; }
...
protected override void OnLoad(EventArgs e)
{
RadTreeView trvGlobalNavFooter = new RadTreeView();
...
}
The problem is that I need to use RadTreeview as a property. How Can I fix this problem??
Thx
HANK
<telerik:RadScheduler x:Name="scheduler" > <telerik:RadScheduler.TimelineViewDefinition > <telerik:TimelineViewDefinition CustomTimeSlotLength="1w" /> </telerik:RadScheduler.TimelineViewDefinition></telerik:RadScheduler>Hi,
I have the same issue as highlighted in this thread: http://www.telerik.com/community/forums/wpf/docking/control-contextmenu-in-a-docking-radpane-does-not-show-up.aspx
However, setting the ContextMenuItemTemplate to null as shown in the documentation does not work
<telerik:RadPane ContextMenuTemplate="{x:Null}">
is showing at the top and then High is showing) . Just want to know how we can manage this behavior.void LoadGraphData(IEnumerable<CasePriorityCount> data) { SeriesMappingCollection mappingCollection = new SeriesMappingCollection(); SeriesMapping mapping = new SeriesMapping(); mapping.ItemMappings.Add(new ItemMapping("Count", DataPointMember.YValue)); mapping.ItemMappings.Add(new ItemMapping("Priority", DataPointMember.LegendLabel)); mapping.ItemMappings.Add(new ItemMapping("Count",DataPointMember.Tooltip)); mapping.SeriesDefinition = new Pyramid3DSeriesDefinition(); List<CaseByPriority> caseByPriorityData = new List<CaseByPriority>(); foreach (CasePriorityCount caseByPriorityCount in data) { caseByPriorityData.Add(new CaseByPriority(caseByPriorityCount.Count, caseByPriorityCount.Priority)); } mappingCollection.Add(mapping); ViewModel.SeriesMappingsData = mappingCollection; ViewModel.Data = caseByPriorityData; }this.Grid.BeginUpdate();
this.Grid.MasterTemplate.Reset();
Grid.DataSource = datatables[0];
if (AddDetails)
{
GridViewTemplate template = new GridViewTemplate();
template.DataSource = datatables[1];
Grid.Templates.Add(template);
GridViewRelation relation = new GridViewRelation(Grid.MasterTemplate);
relation.ChildTemplate = template;
relation.RelationName = "Details";
relation.ParentColumnNames.Add(PC);
relation.ChildColumnNames.Add(CC);
Grid.Relations.Add(relation);
}
Once loaded, the lookup was very fast, i.e. I could expand any row to view the child data more or less
instantly.
However when I switched over to the WPF gridview, performance for the same input became
unacceptably slow, for example it takes
approximately 2 seconds every time to expand a row to view the child data.
The WPF xaml looks like so:<Grid>
<telerik:RadGridView x:Name="BugGrid"
IsFilteringAllowed="True"
IsReadOnly="True"
CanUserInsertRows="False"
TabIndex="1"
AutoGenerateColumns="False"
DataLoading="DataLoading"
RowHeight="32"
MaxColumnWidth="200"
EnableRowVirtualization="True"
EnableColumnVirtualization="True"
DataLoadMode="Asynchronous"
>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding asdfas}"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Blah}"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding PC}" IsVisible="False"/>
</telerik:RadGridView.Columns>
<telerik:RadGridView.ChildTableDefinitions>
<telerik:GridViewTableDefinition x:Name="Details">
<telerik:GridViewTableDefinition.Relation>
<telerik:TableRelation>
<telerik:TableRelation.FieldNames>
<telerik:FieldDescriptorNamePair
ParentFieldDescriptorName="PC"
ChildFieldDescriptorName="CC"/>
</telerik:TableRelation.FieldNames>
</telerik:TableRelation>
</telerik:GridViewTableDefinition.Relation>
</telerik:GridViewTableDefinition>
</telerik:RadGridView.ChildTableDefinitions>
</telerik:RadGridView>
</Grid>
In the code behind I define the properties of the child table in DataLoading
private void DataLoading(object sender, GridViewDataLoadingEventArgs e)
{
GridViewDataControl dataControl = (GridViewDataControl) sender;
if (dataControl.ParentRow != null)
{
dataControl.AutoGenerateColumns = false;
dataControl.ShowGroupPanel = false;
dataControl.IsFilteringAllowed = false;
dataControl.CanUserFreezeColumns = false;
dataControl.IsReadOnly = true;
GridViewDataColumn column = new GridViewDataColumn();
column.DataMemberBinding = new Binding("CC");
column.IsVisible = false;
column = new GridViewDataColumn();
column.DataMemberBinding = new Binding("Name");
dataControl.Columns.Add(column);
column = new GridViewDataColumn();
column.DataMemberBinding = new Binding("Value");
dataControl.Columns.Add(column);
}
I set the data source of the child table definition to the be the data table with the details.
I've been able to determine that it's the looking up of the appropriate child data from
the data table that is the very slow part (e.g. if the details data table is blank,
the rows expand instantly) but why is it SO much slower than the old WinControls grid, which also worked with the same data using a similar Relationship.
More importantly, how can I speed it up?