or
IList<Project> project = new List<Project>();IList<Topic> topic = new List<Topic>();IList<Cloud> cloud = new List<Cloud>();IList<Trend> trend = new List<Trend>();IList<Schedule> schedule = new List<Schedule>();cloud.Add(new Cloud { Name = "cloud1" });cloud.Add(new Cloud { Name = "cloud2" });trend.Add(new Trend { Name = "trend 1" });trend.Add(new Trend { Name = "trend 2" });schedule.Add(new Schedule { Name = "sched 1" });schedule.Add(new Schedule { Name = "sched 2" });topic.Add(new Topic { Name = "Clouds", CloudAssociation = cloud });topic.Add(new Topic { Name = "Trends", TrendAssociation = trend });topic.Add(new Topic { Name = "Schedules", ScheduleAssociation = schedule });//Project.project.Add(new Project { Name = "My Project", TopicAssociation = topic });radTreeView1.DisplayMember = "Name\\Name\\Name";radTreeView1.ParentMember = "Project\\TopicAssociation";radTreeView1.ChildMember = "Project\\TopicAssociation\\CloudAssociation";radTreeView1.DataSource = project;
I would want that area of ChartElement was fixed and I was able to move an ChartElement
when using the zoom. How I can do it?
class Zoom { static double horizontalScale = 1; static double verticalScale = 1; public static double HorizontalScale { get { return horizontalScale; } set { horizontalScale = Math.Max(1, value); } } public static double VerticalScale { get { return verticalScale; } set { verticalScale = Math.Max(1, value); } } } private void radChartViewAnalysis_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e) { Zoom.HorizontalScale += e.Delta / 3000.0; Zoom.VerticalScale += e.Delta / 3000.0; radChartViewAnalysis.ChartElement.View.Zoom(Zoom.HorizontalScale, Zoom.VerticalScale); }public interface IBase
{ string Name { get; set; }public class First : IBase{ public string Name { get; set; }}
public class Second : IBase
{
public string Name { get; set; }
}private void button5_Click(object sender, EventArgs e) { IList<First> tests = new List<First>(); First test = new First(); test.Name = "Test1"; tests.Add(test); First test2 = new First(); test2.Name = "Test2"; tests.Add(test2); IList<Second> tests2 = new List<Second>(); Second test22 = new Second(); test22.Name = "Test12"; tests2.Add(test22); Second test222 = new Second(); test222.Name = "Test22"; tests2.Add(test222); IList<IBase> all = new List<IBase>(); foreach(var item in tests) { all.Add(item); } foreach(var item in tests2) { all.Add(item); } radDropDownList1.DataSource = all; radDropDownList1.DisplayMember = "Name"; }private void grid_RowValidating(object sender, RowValidatingEventArgs e) { if (e.Row == null) return; if (!e.Row.IsModified) return; }private void grdPirteyMenahel_RowsChanged(object sender, GridViewCollectionChangedEventArgs e) { grid.EndEdit(); }


DataTable dtAct = new DataTable();BindingSource bsAct = new BindingSource();//dtAct is populated by a query from my db.bsAct.DataSource = dtAct;bsAct.Position = 0;/*GetSupCat() returns value text1 Test12 Test23 Test3*/cbMainActSupCat.DataSource = GetSupCat(); //Procedure that returns a datatable with the data to populate the comboboxcbMainActSupCat.DisplayMember = "value";cbMainActSupCat.ValueMember = "value";cbMainActSupCat.DataBindings.Add(new Binding("SelectedItem", bsAct, "SupCat")); //SupCat comes from bindingsource from my original query
private void myRadGridView_DefaultValuesNeeded(object sender, Telerik.WinControls.UI.GridViewRowEventArgs e){ int index = e.Row.Index; int index2 = this.myRadGridView.CurrentRow.Index;}