Ultragrid复选框列 [英] Ultragrid checkbox column
本文介绍了Ultragrid复选框列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将已检查的单元格值添加到Datatable.My代码如下。但每次当我检查单元格时,它只添加选定的单元格值。当前选中。不是所有选定的单元格值。可能是事件中的问题(cell_change)?请帮助。
I need to add checked cell value to Datatable.My code is below.But every time when I check cell it add only selected cell value.Currently selected.Not all selected cells values.May be problem in event(cell_change)?Help please.
private void ultraGrid3_CellChange(object sender, CellEventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("Fields",typeof(String));
DataRow row = dt.NewRow();
row[0] =e.Cell.Row.Cells["Selected_Fields"].Value.ToString();
dt.Rows.Add(row);
return dt;
this.ultraGrid4.DataSource = dt;
}
推荐答案
Hello,
A possible approach to achieve this might be by using the following code:
<pre lang="vb">Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
'e.Layout.Bands(0).Override.CellAppearance.BackColor = Color.Red
Me.UltraGrid1.DisplayLayout.Bands(0).Columns(5).Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox
End Sub</pre>
如果你需要更多hel请访问以下链接
http://ahmadkhalid44.blogspot.com/ [ ^ ]
问候:
Ahmad Khalid
软件工程师
if u need more help please visit the below link
http://ahmadkhalid44.blogspot.com/[^]
Regards:
Ahmad Khalid
Software Engineer
这篇关于Ultragrid复选框列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文