The Kettic Data Grid View allows users of the control easily validate data grid cells when data is committed to the data source.To validate data to grid cells and rows, we need to use the Validate Cell event, which will be raised by the Kettic Data Grid View when there are any changes to the current cell or when the grid cell loses input focus like.
About columns checking, do you have to check if there is the correct number of columns to suit the number of columns of data Tables (data Set)? So no manual columns creation, but use Data Source property of DGV, this will automatically create columns (each time).
Just dont forget to set data Source to null when re-setting new data to dgv. But you have to be specific what you have to validagte.
And all the tables do not have same number columns. And also is it possible to validate all columns of a table against regular expression Thank you Sure its possible to use Regular expressions.
But you have to be specific what you have to validagte.
Previously i was having a problem when the user click on the Combo Box but doesn't click the mouse so the Combo Box change commited event doesn't run therefore not getting the row, somebody replied on this forum to say i should declare and put a Combo Box On Drop Down event handler which i put and successfully do it.
Still if the user doesn't event click on the first cell which has this combo Box it doesn't really restrict it.
Autonum, Input type Userid and Timestamp are generated.-----------------------------------Here is some of my code Private Sub Swipe Accumulative Hours Data Grid View_Cell Validating(By Val sender As Object, By Val e As System. Cell Validating 'Validate the Payperiod entry by disallowing empty strings.
Formatted Value End Date Then Swipe Accumulative Hours Data Grid View. Cancel = True End If End If If Swipe Accumulative Hours Data Grid View.
SOLUTION To achieve data validation prior the row is committed, you can handle the Cell Validating event, which is raised by the control when the current cell changes or when it goes out of edit mode.