DataGridView in C#
-
I am using a DataGridView for getting input data from user. In RowLeave event of DataGridView i am checking the cells' values of the DataGridViewRow. There are chances that the user leave some fields empty. I check a certain cell say Column1. If it is empty i want this row should not leave the focus. How could i do that? Thanks.
-
I am using a DataGridView for getting input data from user. In RowLeave event of DataGridView i am checking the cells' values of the DataGridViewRow. There are chances that the user leave some fields empty. I check a certain cell say Column1. If it is empty i want this row should not leave the focus. How could i do that? Thanks.
Hi, try to use the RowValidating event instead. It has a Cancel property which you can set to true when the fields are not set correctly. Haven't used it so far but I think it should be what you need. Robert
-
Hi, try to use the RowValidating event instead. It has a Cancel property which you can set to true when the fields are not set correctly. Haven't used it so far but I think it should be what you need. Robert
With your cooperation i solved my problem. Thank you very much. I expect welcome from you.