DevExpress GridControl

Posted by vinaykannegundla-20815 under Windows Forms on 10/3/2013 | Points: 10 | Views : 5379 | Status : [Member] | Replies : 3
I Drag and Drop the GridControl on the form.Then bind the data from dataSource.
And I add the one column to the grid.Its having all Checkboxes.
But Clicks the checkboxes its not checked, how to check the this checkEdit.


RepositoryItemCheckEdit chxEdit = new RepositoryItemCheckEdit();
DevExpress.XtraGrid.Columns.GridColumn gc = new DevExpress.XtraGrid.Columns.GridColumn();

gridView1.Columns.Add(gc);
gc.Caption = "Select";
gc.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
gc.OptionsColumn.AllowEdit = false;
gc.VisibleIndex = 0;
gc.OptionsColumn.AllowSize = false;
gc.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
chxEdit.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
chxEdit.CheckStyle = CheckStyles.Style6;
chxEdit.ValueChecked = true;
chxEdit.ValueUnchecked = false;
gc.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gc.AppearanceHeader.Options.UseFont = true;
gc.AppearanceHeader.Font = new System.Drawing.Font("Tahoma", 9);
gc.ColumnEdit = chxEdit;




Responses

Posted by: Bandi on: 10/3/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer
http://www.devexpress.com/Support/Center/Question/Details/Q502137
http://stackoverflow.com/questions/17815883/checkbox-is-not-checked-in-devexpress-gridcontrol-using-wpf
http://stackoverflow.com/questions/17809435/checked-event-of-checkbox-column-of-devexpresss-datagrid-control-in-wpf
http://www.devexpress.com/Support/Center/Question/Details/Q337386
http://www.devexpress.com/Support/Center/Question/Details/Q518475
http://www.devexpress.com/Support/Center/Question/Details/Q522607

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

vinaykannegundla-20815, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vinaykannegundla-20815 on: 10/30/2013 [Member] Starter | Points: 25

Up
0
Down
tahnk u

vinaykannegundla-20815, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vinaykannegundla-20815 on: 10/30/2013 [Member] Starter | Points: 25

Up
0
Down

In Class ()
ArrayList bIsSelected = new ArrayList();

private void gridView1_CustomUnboundColumnData(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs e)
{
if (e.Column.FieldName == "bIsSelected")
{
if (e.IsGetData == true)
{
e.Value = bIsSelected[e.ListSourceRowIndex];
}
else
{
bIsSelected[e.ListSourceRowIndex] = Convert.ToBoolean(e.Value);
}
}
}

//I wrote this code then checkBoxes checked


vinaykannegundla-20815, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response