Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
To use images and text together in a grid cell
posted

Nice to meet you all who help.

I would appreciate it if you could tell me how I can change the color according to specific conditions as below, and put numbers or characters together in the cell.

Thank you, and have a great day!

Parents
No Data
Reply
  • 28945
    Offline posted

    Hello and thank you for contacting Infragistics. I attached a demo to achieve your desired behavior.

    eg.

     Private Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
         Dim layout As UltraGridLayout = e.Layout
         Dim band As UltraGridBand = layout.Bands(0)
         Dim ov As UltraGridOverride = layout.Override
    
         Dim hazardousImages As ValueList = e.Layout.ValueLists.Add("Hazardous")
         Dim vli As ValueListItem = hazardousImages.ValueListItems.Add(False, "No")
         vli.Appearance.Image = My.Resources.Resource1.No
         vli.Appearance.BackColor = Color.Red
         vli = hazardousImages.ValueListItems.Add(True, "Yes")
         vli.Appearance.Image = My.Resources.Resource1.Yes
         vli.Appearance.BackColor = Color.LimeGreen
         e.Layout.Bands(0).Columns("Boolean 1").ValueList = hazardousImages
         e.Layout.Bands(0).Columns("Boolean 1").CellActivation = Activation.AllowEdit
    
    
     End Sub
    5824.MemDataTable VB.zip

Children
No Data