M.Ammar Posted September 5, 2019 Share Posted September 5, 2019 hi I cannot get UnimDBListGrid1 to display images Column image Visible := True procedure TMainmForm.UnimDBListGrid1FieldImage( const Column: TunimDBListGridColumn; const AField: TField; var OutImage: TGraphic; var DoNotDispose: Boolean; var ATransparent: TUniTransparentOption); begin if SameText(AField.FieldName, 'isDirty') then begin if AField.AsBoolean then OutImage := UniImage1.Picture.Graphic else OutImage := UniImage2.Picture.Graphic; end; end; procedure TMainmForm.UnimDBListGrid1FieldImageURL( const Column: TunimDBListGridColumn; const AField: TField; var OutImageURL: string); begin if SameText(AField.FieldName, 'isDirty') then begin if AField.AsBoolean then OutImageURL := 'files/Dirty.png' else OutImageURL := 'files/check.png'; end end; Code is copied from the example and working with unimdbgrid but I need to replace it for many reasons. any suggestions Best regards Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted September 5, 2019 Share Posted September 5, 2019 Hello Can you please create a test case? Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted September 8, 2019 Author Share Posted September 8, 2019 On 9/5/2019 at 7:32 PM, Hayri ASLAN said: Hello Can you please create a test case? Hi Thank you for reply you can use the demo as a test case because my db is SQL Server and I don't know how to make without C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Touch\DBListGrid add the flowing code and enable image visible for the column procedure TMainmForm.UnimDBListGrid1FieldImage( const Column: TunimDBListGridColumn; const AField: TField; var OutImage: TGraphic; var DoNotDispose: Boolean; var ATransparent: TUniTransparentOption); begin if SameText(AField.FieldName, 'Length (cm)') then begin if True then OutImage := UniImage1.Picture.Graphic else OutImage := UniImage2.Picture.Graphic; end; end you will find that the code is never called , unlike if you use UnimDBGrid you find that the code is called normally Regards Quote Link to comment Share on other sites More sharing options...
GoldLine Posted August 12, 2020 Share Posted August 12, 2020 Hello, any news about this?? Quote Link to comment Share on other sites More sharing options...
Luis German Posted February 7, 2023 Share Posted February 7, 2023 Check image options of the column Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.