hello,
Im generating my GanttViewDataItems per code. I will not set up a DataSet for it. Everything works fine, but I need that the item has an extra property for an extra TextViewCollumn.
I have set up my cols:
GanttViewTextViewColumn titleColumn = new GanttViewTextViewColumn("Title");
GanttViewTextViewColumn startColumn = new GanttViewTextViewColumn("Start");
GanttViewTextViewColumn endColumn = new GanttViewTextViewColumn("End");
GanttViewTextViewColumn dauerColumn = new GanttViewTextViewColumn("Progress");
GanttViewTextViewColumn myColumn = new GanttViewTextViewColumn("myValue");
titleColumn.HeaderText = "title";
startColumn.HeaderText = "title";
endColumn.HeaderText = "title";
dauerColumn.HeaderText = "title";
planmengeColumn.HeaderText = "myvalue";
this.radGanttView.GanttViewElement.Columns.Add(titleColumn);
this.radGanttView.GanttViewElement.Columns.Add(startColumn);
this.radGanttView.GanttViewElement.Columns.Add(endColumn);
this.radGanttView.GanttViewElement.Columns.Add(dauerColumn);
this.radGanttView.GanttViewElement.Columns.Add(myColumn);
Then i create my Items ( I loop them outside):
GanttViewDataItem item = new GanttViewDataItem();
item.Tag = value1.ToString();
item.Start = value2.ToDateTime();
item.End = value3.ToDateTime();
item.Title = value4.ToString();
item.Progress = value5.ToInt16();
myRadObject plan = new myRadObject();
plan.myValue = 121212;
plan.SetValue(myRadObject.myProperty, plan.myValue);
item.BindProperty(myRadObject.myProperty, plan, myRadObject.myProperty, PropertyBindingOptions.OneWay);
I created a inner class for RadObject (myRadObject)
internal class myRadObject : RadObject
{
public static RadProperty myProperty = RadProperty.Register("myValue", typeof(decimal), typeof(myRadObject),
new RadElementPropertyMetadata("", ElementPropertyOptions.None));
public decimal val
{
get {return (decimal)this.GetValue(myProperty); }
set { this.SetValue(myProperty, value); }
}
}
Add to GanttView:
this.radGanttView.Items.Add(item);
The problem is that it will not display the items in the "myValue" collumn, the rest works great!
Im generating my GanttViewDataItems per code. I will not set up a DataSet for it. Everything works fine, but I need that the item has an extra property for an extra TextViewCollumn.
I have set up my cols:
GanttViewTextViewColumn titleColumn = new GanttViewTextViewColumn("Title");
GanttViewTextViewColumn startColumn = new GanttViewTextViewColumn("Start");
GanttViewTextViewColumn endColumn = new GanttViewTextViewColumn("End");
GanttViewTextViewColumn dauerColumn = new GanttViewTextViewColumn("Progress");
GanttViewTextViewColumn myColumn = new GanttViewTextViewColumn("myValue");
titleColumn.HeaderText = "title";
startColumn.HeaderText = "title";
endColumn.HeaderText = "title";
dauerColumn.HeaderText = "title";
planmengeColumn.HeaderText = "myvalue";
this.radGanttView.GanttViewElement.Columns.Add(titleColumn);
this.radGanttView.GanttViewElement.Columns.Add(startColumn);
this.radGanttView.GanttViewElement.Columns.Add(endColumn);
this.radGanttView.GanttViewElement.Columns.Add(dauerColumn);
this.radGanttView.GanttViewElement.Columns.Add(myColumn);
Then i create my Items ( I loop them outside):
GanttViewDataItem item = new GanttViewDataItem();
item.Tag = value1.ToString();
item.Start = value2.ToDateTime();
item.End = value3.ToDateTime();
item.Title = value4.ToString();
item.Progress = value5.ToInt16();
myRadObject plan = new myRadObject();
plan.myValue = 121212;
plan.SetValue(myRadObject.myProperty, plan.myValue);
item.BindProperty(myRadObject.myProperty, plan, myRadObject.myProperty, PropertyBindingOptions.OneWay);
I created a inner class for RadObject (myRadObject)
internal class myRadObject : RadObject
{
public static RadProperty myProperty = RadProperty.Register("myValue", typeof(decimal), typeof(myRadObject),
new RadElementPropertyMetadata("", ElementPropertyOptions.None));
public decimal val
{
get {return (decimal)this.GetValue(myProperty); }
set { this.SetValue(myProperty, value); }
}
}
Add to GanttView:
this.radGanttView.Items.Add(item);
The problem is that it will not display the items in the "myValue" collumn, the rest works great!