C#winforms dataconrid里面的chartcontrol [英] C# winforms datagridview inside chartcontrol
问题描述
我需要在单元格图表控件中使用datagridview的代码。
可以是任何链接或代码 那里。
我正在开发一个需要datagridview的windows应用程序eatch行应该显示图表控件。
我知道在asp.net但需要帮助o winforms。
我不确定将网格视图放在图表控件中。但我是通过在图例上不使用自定义标签以另一种方式完成的。
您可以将自定义标签排列成图表控件内的表格。
然后将数据绑定在自定义标签中
Legend mylegand = new Legend();
mylegand.Alignment = StringAlignment。中心;
< span lang ="EN-US"style ="font-family:'Courier New'"> User_chart.Legends.Insert(0,mylegand);
User_chart.Legends [0] .Docking = Docking.Top;
LegendItem newItem = new LegendItem();
newItem.ImageStyle = LegendImageStyle.Marker;
newItem.Cells.Add(LegendCellType.Text," First Column",
ContentAlignment 。BottomLeft);
newItem.Cells.Add(LegendCellType.Text," Second Column",
ContentAlignment .BottomLeft);
newItem.Cells.Add(LegendCellType.Text," Third Column",ContentAlignment.BottomLeft);
User_chart.Legends [0] .CustomItems.Add(newItem);
您可以放置您的值而不是第一列,第二列等。 跨度>
Hi,
I need code for datagridview inside cell chart control.
may i any links or code there.
I am developing a windows application which need datagridview eatch row should display chart control.
i know in asp.net but need help o winforms.
I'm not sure about placing grid view inside chart control. but I done it in another way by using no of custom labels on legends.
You can arrange the custom labels look like a table in inside the chart control.
then bind your data in custom labels
Legend mylegand = new Legend();
mylegand.Alignment = StringAlignment.Center;
User_chart.Legends.Insert(0, mylegand);
User_chart.Legends[0].Docking = Docking.Top;
LegendItem newItem = new LegendItem();
newItem.ImageStyle = LegendImageStyle.Marker;
newItem.Cells.Add(LegendCellType.Text, "First Column", ContentAlignment.BottomLeft);
newItem.Cells.Add(LegendCellType.Text, "Second Column", ContentAlignment.BottomLeft);
newItem.Cells.Add(LegendCellType.Text, "Third Column", ContentAlignment.BottomLeft);
User_chart.Legends[0].CustomItems.Add(newItem);
You can place your values instead of First Column,Second Column etc..
这篇关于C#winforms dataconrid里面的chartcontrol的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!