Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1380
ultragrid column checkbox
posted

Hello. could you watch this code?It works ,But cant check checkbox.It is not active.Despite I activated.And check column datatype is boolean.

private void besGrid2_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
DataTable dtb = new DataTable();
dtb.Columns.Add("ID", typeof(Int32));
dtb.Columns.Add("Text", typeof(string));
dtb.Columns.Add("Check",typeof(bool));

dtb.Rows.Add(new object[] { 1, "A" });
dtb.Rows.Add(new object[] { 2, "B" });
e.Layout.Bands[0].Columns[2].Style = ColumnStyle.CheckBox;
e.Layout.Bands[0].Columns[2].CellActivation = Activation.AllowEdit;
e.Layout.Bands[0].Columns[2].CellClickAction = CellClickAction.Edit;
this.besGrid2.DataSource = dtb;
}