UltraWebGrid 新增加行
2009-01-19 17:59
274 查看
//取出UltraWebGrid1的key()
ArrayList alItemId = new ArrayList();
RowsCollection row1 = UltraWebGrid1.DisplayLayout.Rows;
for (int i = 0; i < row1.Count; i++)
{
//PTK_PLAN_ITEM 捆 包 号
if (row1[i].Cells.FromKey("cust_bundle_no").Value != null)
alItemId.Add(row1[i].Cells.FromKey("cust_bundle_no").Value.ToString());
}
//DialogUltraWebGrid
SelectedRowsCollection rows = DialogUltraWebGrid.DisplayLayout.SelectedRows;
for (int i = 0; i < rows.Count; i++)
{
//添加不存在的记录
if (!alItemId.Contains(rows[i].Cells.FromKey("KBH").Value.ToString()))
{
UltraGridRow GridRow = new UltraGridRow();
//------------------------------------------------
GridRow = this.UltraWebGrid1.Rows.Band.AddNew();
GridRow.Cells.FromKey("cust_bundle_no").Value = rows[i].Cells.FromKey("kbh").Value.ToString(); //客户捆包号
GridRow.Cells.FromKey("bundle_no").Value = rows[i].Cells.FromKey("mjh").Value.ToString(); //母卷号
GridRow.Cells.FromKey("steel_num").Value = rows[i].Cells.FromKey("bs_gzmc").Value.ToString(); //母材钢种
GridRow.Cells.FromKey("net_qty").Value = rows[i].Cells.FromKey("jz").Value.ToString(); //母材净重
GridRow.Cells.FromKey("prod_pieces").Value = rows[i].Cells.FromKey("zs").Value.ToString(); //成品数量
}
}
ArrayList alItemId = new ArrayList();
RowsCollection row1 = UltraWebGrid1.DisplayLayout.Rows;
for (int i = 0; i < row1.Count; i++)
{
//PTK_PLAN_ITEM 捆 包 号
if (row1[i].Cells.FromKey("cust_bundle_no").Value != null)
alItemId.Add(row1[i].Cells.FromKey("cust_bundle_no").Value.ToString());
}
//DialogUltraWebGrid
SelectedRowsCollection rows = DialogUltraWebGrid.DisplayLayout.SelectedRows;
for (int i = 0; i < rows.Count; i++)
{
//添加不存在的记录
if (!alItemId.Contains(rows[i].Cells.FromKey("KBH").Value.ToString()))
{
UltraGridRow GridRow = new UltraGridRow();
//------------------------------------------------
GridRow = this.UltraWebGrid1.Rows.Band.AddNew();
GridRow.Cells.FromKey("cust_bundle_no").Value = rows[i].Cells.FromKey("kbh").Value.ToString(); //客户捆包号
GridRow.Cells.FromKey("bundle_no").Value = rows[i].Cells.FromKey("mjh").Value.ToString(); //母卷号
GridRow.Cells.FromKey("steel_num").Value = rows[i].Cells.FromKey("bs_gzmc").Value.ToString(); //母材钢种
GridRow.Cells.FromKey("net_qty").Value = rows[i].Cells.FromKey("jz").Value.ToString(); //母材净重
GridRow.Cells.FromKey("prod_pieces").Value = rows[i].Cells.FromKey("zs").Value.ToString(); //成品数量
}
}
相关文章推荐
- 在客户端为UltraWebGrid增加行
- 在UltraWebGrid中增加CheckBox列
- 客户端为UltraWebGrid增加新行
- UltraWebGrid两种显示样式
- UltraWebGrid使用总结
- 轻松实现UltraWebGrid中的分页控制
- Infragistics.WebUI.UltraWebGrid中嵌套控件的属性设置
- 解决Infragistics.WebUI.UltraWebGrid 列头文本换行的Bug
- ultrawebgrid的一些基本应用
- 在UltraWebGrid单元格中绑定dropdownlist
- UltraWebGrid在不分页的情况下默认只能显示50条数据的问题
- 【转】关于Infragistics.WebUI.UltraWebGrid的使用
- 对于UltraWebGrid,如何手动合并行单元格?
- UltraWebGrid使用,注意事项集合
- 如何在UltraWebGrid的Cell中显示Image
- 用javascript将ultrawebgrid单元格的内容设置为超链接
- UltraWebGrid客户端将行移至顶部或底部
- UltraWebGrid勾选记录相关操作
- UltraWebGrid中HyperLink属性的列如何链接到网址(下载)?
- 在UltraWebGrid的InitializeRow事件中,操作模板列中的控件