Show Image Inside a Flex Grid Cell

Posted by: yuvaopens on 8 November 2017, 11:55 am EST

    • Post Options:
    • Link

    Posted 8 November 2017, 11:55 am EST

    Hi All,

    I Would like to Show the Image based on my PersonalNr in Flex Grid. I Already achieved the same through TrueDB Grid and now I'm in a situtation to make use of Flex Grid. Please help me to reach the goal using Flex Grid. Sample of Image Display through TrueDBGrid fetch Cell Style is below.
    

    Private Sub grdNonWorkingDays_FetchCellStyle(sender As Object, e As FetchCellStyleEventArgs) Handles grdNonWorkingDays.FetchCellStyle

    Try

    If Me.grdNonWorkingDays.Splits(0).DisplayColumns(“Image”).Visible Then

    Dim nWidth As Integer = Me.grdNonWorkingDays.Splits(0).DisplayColumns(“Image”).Width

    Dim nHeight As Integer = Me.grdNonWorkingDays.RowHeight

                Dim nPersonalNr As Long = Convert.ToInt64(Me.grdNonWorkingDays.Columns("PersonalNr").CellValue(e.Row))
                e.CellStyle.ForegroundImage = csGraphics.GetPersonalImage(nPersonalNr, nWidth, nHeight)
                e.CellStyle.ForeGroundPicturePosition = C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.PictureOnly
            End If
        Catch ex As Exception
            csExceptionForm.ShowDialogForm(ex, csExceptionForm.ExceptionButtons.NextCommand)
        End Try
    End Sub
    
  • Posted 9 November 2017, 12:52 am EST

    Hello,

    Please refer the following link to show image inside a FlexGrid cell:

    http://helpcentral.componentone.com/nethelp/c1flexgrid/addingpicturesandtexttoacell.html

    Also, you can refer the product sample “DBImages” located at:

    “C:\Users\UserName\Documents\ComponentOne Samples\WinForms\C1FlexGrid\CS\DBImages”

    Hope it helps.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels