Jump to content

UniDBGrid


MOGSY

Recommended Posts

Hi

I would like to change the font colour and background colour of a cell in UniDBGrid on client side depending on the value of a cell. The cell font colour may change just depending on how long the grid is displayed. I cant use OnDrawColumnCell since that event is fired when the underlying data has been updated. Here the data is not changing just the fact that time is passed the font colour of the cell need to be changed. Also I prefer not to update the whole Grid just the a specific cell.

Thanking you in advance.

Regards.

Link to comment
Share on other sites

Hi Sherzod

I have a UniDbGrid with one field is date and time, what I need to do is if the record has not been modified for a defined period, I need to give the users feedback with change of colour of the field. However I do not want to keep retrieving data from the server and do the update on refresh, since the screen will flicker also avoid unnecessary server request.

I would like to do this on the client side since no new information required from the server nor it needs to update anything.

Regards

Link to comment
Share on other sites

1 hour ago, MOGSY said:

Hi Sherzod

I have a UniDbGrid with one field is date and time, what I need to do is if the record has not been modified for a defined period, I need to give the users feedback with change of colour of the field. However I do not want to keep retrieving data from the server and do the update on refresh, since the screen will flicker also avoid unnecessary server request.

I would like to do this on the client side since no new information required from the server nor it needs to update anything.

Regards

Hello, If I can suggest you to use HTML in SQL query, like this:

SELECT

     CASE

                  WHEN sDateField between '' and '' THEN '<p style=background-color:red;>' + YourColumn + '</p>'

                  WHEN sDateField between '' and '' THEN '<p style=background-color:green;>' + YourColumn + '</p>'

  ELSE sDateField between '' and '' THEN '<p>' + YourColumn + '</p>'

  END

FROM You table

 

Link to comment
Share on other sites

Hi 

The issue with that is, it is OK for when data is fetched from the server, however as the time passes the colour remain the same. What is required is as the time passes the colour should change, so for example if 10 minutes passed the font colour could be yellow and after 20 minutes changes to red.

Regards

Link to comment
Share on other sites

12 minutes ago, MOGSY said:

Hi 

The issue with that is, it is OK for when data is fetched from the server, however as the time passes the colour remain the same. What is required is as the time passes the colour should change, so for example if 10 minutes passed the font colour could be yellow and after 20 minutes changes to red.

Regards

OK, how to activate event to redraw colors ?

What will fire refresh event ?

Timers or every redraw of the form/components ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...