Comparison of the value of a cell

2 posts, 0 answers
  1. Vlad
    Vlad avatar
    12 posts
    Member since:
    Jun 2010

    Posted 05 Mar 2015 Link to this post

    Hi.Why e.CellElement.Text or Value > "1" is working and e.CellElement.Value > 1 does not work? Sorry for my English. And what if you need to compare with a Double, but not with the String? CDbl tried that did not work.
  2. Vlad
    Vlad avatar
    12 posts
    Member since:
    Jun 2010

    Posted 05 Mar 2015 Link to this post

    If e.CellElement.Value > "0.1" And e.CellElement.ColumnInfo.HeaderText <> "Current DateTime" Then
                e.CellElement.DrawFill = True
                e.CellElement.BackColor = Color.Pink
                e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid
    Working
    If e.CellElement.Value > 0.1 And e.CellElement.ColumnInfo.HeaderText <> "Current DateTime" Then
                e.CellElement.DrawFill = True
                e.CellElement.BackColor = Color.Pink
                e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid
    Error Visual Studio "An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll"
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top