图片在我的服务器上面
图片地址:http://www.27sea.com/question.jpg是一个权限管理的界面。
选择上面的工作组,即出现下面的权限列表。
列表我用DataGrid做,可是无法向里面加选择框。
DataTable[""].Rows.add()方法可以增加的参数是对象object[],那么应该什么都可以增加
可是显示出来的东西,是调用增加对象的ToString()方法。比如:
DataTable["xx"].Rows.Add(new System.window.froms.button("按钮"));
在DataGrid里也只显示“System.Windows.Forms.Button, Text: 铵钮”这两个字,而不是一个按钮
很明显是调用了ToString()方法。唉,也许刚才门吧。我记录Java里的表格,单无格里可以随便放,可以放图片,可以放下拉列表,当然也可以放选择框什么的。高手就指点。
图片地址:http://www.27sea.com/question.jpg是一个权限管理的界面。
选择上面的工作组,即出现下面的权限列表。
列表我用DataGrid做,可是无法向里面加选择框。
DataTable[""].Rows.add()方法可以增加的参数是对象object[],那么应该什么都可以增加
可是显示出来的东西,是调用增加对象的ToString()方法。比如:
DataTable["xx"].Rows.Add(new System.window.froms.button("按钮"));
在DataGrid里也只显示“System.Windows.Forms.Button, Text: 铵钮”这两个字,而不是一个按钮
很明显是调用了ToString()方法。唉,也许刚才门吧。我记录Java里的表格,单无格里可以随便放,可以放图片,可以放下拉列表,当然也可以放选择框什么的。高手就指点。
you can see this : Q :How can I put a combobox in a column of a datagrid?http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q480q
// code assumes you have a DataSet named myDataSet, a table named "EastCoastSales" and a DataGrid myDataGrid
//STEP 1: Create a DataTable style object and set properties if required.
DataGridTableStyle ts1 = new DataGridTableStyle();
//specify the table from dataset (required step)
ts1.MappingName = "EastCoastSales";
// Set other properties (optional step)
ts1.AlternatingBackColor = Color.LightBlue;
//STEP 2: Create a string column and add it to the tablestyle
DataGridColumnStyle TextCol = new DataGridTextBoxColumn();
TextCol.MappingName = "custName"; //from dataset table
TextCol.HeaderText = "Customer Name";
TextCol.Width = 250;
ts1.GridColumnStyles.Add(TextCol);
//STEP 3: Create an int column style and add it to the tablestyle
//this requires setting the format for the column through its property descriptor
PropertyDescriptorCollection pdc = this.BindingContext
[myDataSet, "EastCoastSales"].GetItemProperties();
//now created a formated column using the pdc
DataGridDigitsTextBoxColumn csIDInt =
new DataGridDigitsTextBoxColumn(pdc["CustID"], "i", true);
csIDInt.MappingName = "CustID";
csIDInt.HeaderText = "CustID";
csIDInt.Width = 100;
ts1.GridColumnStyles.Add(csIDInt);
//STEP 4: Add the checkbox
DataGridColumnStyle boolCol = new DataGridBoolColumn();
boolCol.MappingName = "Current";
boolCol.HeaderText = "Info Current";
//uncomment this line to get a two-state checkbox
//((DataGridBoolColumn)boolCol).AllowNull = false;
boolCol.Width = 150;
ts1.GridColumnStyles.Add(boolCol);
//STEP 5: Add the tablestyle to your datagrid's tablestlye collection
myDataGrid.TableStyles.Add(ts1);
或者干脆就用treeview不是更方便
eform自定义表单平台适用于网上OA系统的自定义表单模块,工作流系统的自定义表单模块,信息管理系统方面的软件开发项目等等。 方成eform自定义表单平台,纯BS结构.100%开放源码.可以在 http://218.30.103.110:8080/eform/index.html 在线试用.