[ [Ajax.AjaxMethod]
public ArrayList InitializeInfo()
{
...
// int pageable=1; masterDetail =1;editable = 1;pageSize=10; height=300
string [] FunctionProperty = {"1", "1", gEdit, gPageSize, gridHeight, gridWidth};
//={}-没有可用控件,0-标签,1-图像,2-超级链接,3-文本框,4-复选框,5-下拉列表框
string [] ColumnControlType = {"0","2","3","3","0","3","4"};
//显示哪些列(3,4,5,7)是可编辑的
string [] ColumnEditable = {"0","0","1","1","1","0","1"};
//下列属性仅仅用于非页面支持情况下
//下列一句用于把第3,4,5列编辑按钮的尺寸重新设置为10,10,10
string [] ResetIfNoEditable = {"0","0","10","10","10", "0"};
string [] CustomizedHeadZize={"68","140","120","120","120", "0"};
//当没有页面支持设置时,需要列宽度;你应该把一列设置为"0"
string [] columnWidth ={"68","140","120","120","120","0"};
...
return al;
}
[Ajax.AjaxMethod]
public ArrayList GetHeadArray()
{
...
//这个数组应该匹配编辑字段-column3=Decimal,column4=Email,column5=Number
string [] ValidateType = {"","","Decimal","Email","Number"};
//赋值ColumnDisplayName = {};如果不使用定制显示名
string [] ColumnDisplayName = {};
...
}
最后,十分感谢Michael Schwarz,是他创建了搭建起JavaScript与.Net之间桥梁的ajax.net。
文章来源于领测软件测试网 https://www.ltesting.net/