combit List & Label 29 - .NET Help
combit.Reporting.DesignerExtensions Namespace / DesignerProperty Class / ValueChanged Event
Example


In This Topic
    ValueChanged Event
    In This Topic
    This event is raised whenever the property's value changed. It can be used to update the enabled state of other dependent properties.
    Syntax
    'Declaration
     
    
    Public Event ValueChanged As EventHandler(Of EventArgs)
    public event EventHandler<EventArgs> ValueChanged
    public:
    event EventHandler<EventArgs^>^ ValueChanged
    Example
    void MapProperty_ValueChanged(object sender, EventArgs e)
    {
        switch (obj.CoordinateEvaluationType)
        {
            case CoordinateEvaluation.Coordinates:
                {
                    obj.DesignerProperties["City"].Enabled = false;
                    obj.DesignerProperties["Latitude"].Enabled = true;
                    obj.DesignerProperties["Longitude"].Enabled = true;
                }
                break;
            case CoordinateEvaluation.GeoCoder:
                {
                    obj.DesignerProperties["City"].Enabled = true;
                    obj.DesignerProperties["Latitude"].Enabled = false;
                    obj.DesignerProperties["Longitude"].Enabled = false;
                }
                break;
            default:
                break;
        } 
    }
    Private Sub MapProperty_ValueChanged(sender As Object, e As EventArgs)
    	Select Case obj.CoordinateEvaluationType
    		Case CoordinateEvaluation.Coordinates
    			If True Then
    				obj.DesignerProperties("City").Enabled = False
    				obj.DesignerProperties("Latitude").Enabled = True
    				obj.DesignerProperties("Longitude").Enabled = True
    			End If
    			Exit Select
    		Case CoordinateEvaluation.GeoCoder
    			If True Then
    				obj.DesignerProperties("City").Enabled = True
    				obj.DesignerProperties("Latitude").Enabled = False
    				obj.DesignerProperties("Longitude").Enabled = False
    			End If
    			Exit Select
    		Case Else
    			Exit Select
    	End Select
    End Sub
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also