How to set validation icon in data cell?
Hi...:wave:
I want to set Column Error icons to display them in data cells when it value changed to 5 and less…
I’ve try these codes but it seems they are not working ?!
Code:
Partial Class dataDataSet
Partial Class STOREDataTable
Private Sub STOREDataTable_ColumnChanging(ByVal sender As Object, ByVal e As System.Data.DataColumnChangeEventArgs) Handles Me.ColumnChanging
If (e.Column.ColumnName = Me.columnItem_Quantity.ColumnName) Then
If CType(e.ProposedValue, Short) <= 5 Then
e.Row.SetColumnError(e.Column, "Quantity must be greater than 5")
Else
e.Row.SetColumnError(e.Column, "")
End If
End If
End Sub
End Class
End Class
-----------------------------------------------------------
Table name: STORE
Field name (to be monitored for low Quantity): Item Quantity
-----------------------------------------------------------
Any ideas please…:confused:
Regards...
Re: How to set validation icon in data cell?
Um, the DataTable is not a visual element so you can't set any kind of icons in it. If you're saying that you've bound that table to a DataGrid or DataGridView then you'd have to handle the appropriate event(s) of that grid and then set the appropriate property or call the appropriate method of that grid or its cell.
Re: How to set validation icon in data cell?
Quote:
Originally Posted by jmcilhinney
Um, the DataTable is not a visual element so you can't set any kind of icons in it. If you're saying that you've bound that table to a DataGrid or DataGridView then you'd have to handle the appropriate event(s) of that grid and then set the appropriate property or call the appropriate method of that grid or its cell.
I’ve seen a tutorial from msdn website to “How Do I: Add Validation” by this link: http://msdn.microsoft.com/en-us/vbasic/bb643821.aspx
But Unfortunately I couldn’t know how to me it works with my project!?
:confused:
Re: How to set validation icon in data cell?
UP
:cry:
anybody can help me PLZ :(
Re: How to set validation icon in data cell?
If you can't explain what the issue is then I can't help. I for onw will not be downloading projects or watching videos. I already said this:
Quote:
If you're saying that you've bound that table to a DataGrid or DataGridView then you'd have to handle the appropriate event(s) of that grid
and you've not even indicated whether you are using a grid or not.
Re: How to set validation icon in data cell?
Quote:
Originally Posted by jmcilhinney
If you can't explain what the issue is then I can't help. I for onw will not be downloading projects or watching videos. I already said this:and you've not even indicated whether you are using a grid or not.
Thanks jmcilhinney for your support...:)
I’m using grid view by dataset.xsd
About the appropriate event I’m not sure I’m using the correct one! Because I’m using the data gird view in this project for navigation only
Regards...
Re: How to set validation icon in data cell?