Results 1 to 7 of 7

Thread: How to set validation icon in data cell?

Threaded View

  1. #1

    Thread Starter
    Lively Member HOTFIX's Avatar
    Join Date
    Sep 2008
    Posts
    91

    Question How to set validation icon in data cell?

    Hi...

    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…

    Regards...
    Last edited by HOTFIX; Dec 14th, 2008 at 12:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width