Errorprovider within a datatable column
-
Hi! i want to show the errorprovider icon within a column of a datatable. and this datatable is bound to datagrid. is there any solution for this?
Are you to do anything to this column? click it? show under certain conditions? otherwise have a look at this should show you what sort of columns you can have in a grid Datagridview Column Types. Bit more info on what you are trying to do will allow a better solution to be given
-
Are you to do anything to this column? click it? show under certain conditions? otherwise have a look at this should show you what sort of columns you can have in a grid Datagridview Column Types. Bit more info on what you are trying to do will allow a better solution to be given
Hi! thanks for ur reply! yes i have some business logic on this column. this column can accept only three values. 1 - store 2 - development agent 3 - previous owner anything else user trying to do system shud show errorprovider on this column with some altert message as well.
-
Hi! thanks for ur reply! yes i have some business logic on this column. this column can accept only three values. 1 - store 2 - development agent 3 - previous owner anything else user trying to do system shud show errorprovider on this column with some altert message as well.
If user enters these values then you will need to use the DataGridView1_CellValueChanged event and then evaulate what the user has entered.
Private Sub DataGridView1_CellContentClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick If e.ColumnIndex = 2 Then 'assuming this is your column number for store, development agent, previous owner 'then show your error message if not enter what is required End If End Sub
if the values are coming from the database only then you need to re-look at your database query. Simon