private void projectsGridView_CustomUnboundColumnData(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs e) { if (e.IsGetData) { Project project = projectsDataSource[e.ListSourceRowIndex]; bool selected = project.Server.Projects.Contains(project); e.Value = selected; } else if (e.IsSetData) { Project project = projectsDataSource[e.ListSourceRowIndex]; bool selected = (bool)e.Value; if (selected) { ConfigurationService.AddProject(project); } else { ConfigurationService.RemoveProject(project); } } }