Hi, I am trying to display a different style for each item in the list depending on a value in the table eg. status. I have setup 3 item styles with different background image. How do I make used of this features? Like if the item status is 'N' then I like to display a background image of New.png and etc.
Hi,
You can use the OnItemRender event to assign an ItemStyle per Item.
Example:
var
si: TIWItemStylesItem;
begin
TIWDBResponsiveList1.ItemStyles.Clear;
si := TIWDBResponsiveList1.ItemStyles.Add;
si.ItemStyle.Color := clWebWhite;
si.ItemStyle.ColorTo := clWebWhite;
si.ItemStyle.BorderColor := clNone;
si.ItemStyle.Font.Size := 14;
si.ItemStyle.Font.Style := [fsBold];
si.ItemStyle.Font.Color := clBlack;
procedure TformResponsiveListDB1.TIWDBResponsiveList1ItemRender(Sender: TObject;
Index: Integer; var ItemStyle: string);
begin
ItemStyle := 'Style0';
end;