September 10th, 2012, 03:06 AM
dataGridView cells formatting
Hi, guys. Sorry to bother you, but I need a little help.
I have a very simple dataGridView control (4 columns, 3 of them read-only). I need:
1) to keep users from entering characters other than 0 and natural numbers (1 to 20) on column 3. Currently, it's formatted as numeric, zero decimals, but accepts anything, including spaces.
2) to have row 0, column 3 as the selected cell when the DGV first opens, so the user can start entering information right away. So far, these instructions:
are not working.
this->dataGridView1->Rows->Cells->Selected = true;
I'd appreciate your help. Thank you very much!
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.