mercredi 11 mars 2015

Datagrid View cells as Boolean values

I am trying to develop a time sheet similar to Outlook meeting scheduling thing(Picture attached from internet). I have days as rows and time as columns. I am trying to use cells in Datagrid view such that when user select cell corresponding to day and time i get input by this selection (nothing to be displayed in cells, I just want to use selected cell as my input). I have declared columns as Boolean type so that selected cell corresponds to True and un-selected as False.



foreach (DataGridViewColumn column in this.dataGridView1.Columns)
{
column.ValueType = typeof(Boolean);
}


However I am not sure how to proceed with this, as I have just declared and not initialized Boolean cells. I am looking a way to initialize cells such that no text appears in cells and I can just take input based upon selection/non selection of cells.enter image description here


Aucun commentaire:

Enregistrer un commentaire