Jump to content

Change field content in a TUnimDBGrid


likemike

Recommended Posts

Hello!

I want do change a field content in a TUnimDBGrid when certain circumstances arise.
In TUniDBGrid there is a method called OnSetCellValue. This method is missing in TUnimDBGrid.
I've tried to use OnDrawColumnCell. I used a dirty workaround to hide some content: 

Attribs.Font.Color:=Attribs.Color;

But this is not perfect, because the user could make the content visible by mouse-marking.
I've searched in the forum but I couldn't find anything that helps.

Any suggestions would be appreciated!

Regards

Mike

Link to comment
Share on other sites

Sure!

I have a TunimDBGrid connected to a query.

Under certain circumstances I want to hide some fields from displaying. But there's only one method (OnDrawColumnCell) in TunimDBGrid which effects the display in a grid. 

Example (a grid of Name, Sex and Age):

Name      Sex     Age
----------------------------
Peter       M       44
John        M       40
Cindy       F       

Although the age of Cindy is stored in the table, it shouldn't be displayed (women don't like that 😉

 

Link to comment
Share on other sites

Hi Sherzod!

I don't know, how to use GetText to change the content of a UnimDBGrid during runtime.

You gave this answer in that post too, 

 

but it seems, that Denton didn't understand this, too, because he solved his problem with calculated fields.
What I need is the method OnSetCellValue like it already exists in the non mobile version of TUnimDBGrid - or a workaround.

Regards

Mike

Link to comment
Share on other sites

×
×
  • Create New...