Jump to content


Photo

Difference behavior when use custom TUniDBEdit control in grid vs in Fieldset


  • Please log in to reply
8 replies to this topic

#1 Tuan

Tuan

    Member

  • Members
  • PipPip
  • 21 posts

Posted 11 November 2017 - 11:53 AM

I create new control base on TUniDBEdit, it has trigger to show lookup dialog.

 

I use this control in grid column editor (name accountEdit1) and name accountEdit2 in other Fieldset (second TagSheet)

 

The first if I edit grid column, press trigger button, lookup dialog show before call field's onvalidation.

 

The second if I edit accountEdit2 control, press trigger button, field's onvalidation call before lookup dialog show.

 

I debugged, on the first  procedure DoSetRemoteValue don't call,  on the second procedure DoSetRemoteValue call before JSEventHandler.

 

Why has difference behavior of same control?

 

I use 1.0.0.1410 Trial

 

Sorry for my English.

 

 

 

 

 

 


  • 0

#2 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9815 posts

Posted 11 November 2017 - 02:03 PM

Do you have access to unigui source code?

Sent from my SM-N900 using Tapatalk
  • 0

#3 Tuan

Tuan

    Member

  • Members
  • PipPip
  • 21 posts

Posted 11 November 2017 - 02:25 PM

Do you have access to unigui source code?

Sent from my SM-N900 using Tapatalk

 

No, from call stack. Please help, I must show 2 or 3 forms of unigui to my boss before decide use unigui. 


  • 0

#4 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9815 posts

Posted 11 November 2017 - 02:34 PM

When editor is in a dbdrig it becomes a part of grid. It behaves differently. You should not use a dbedit for grid. Using a tuniedit is enough.

Sent from my SM-N900 using Tapatalk
  • 0

#5 Tuan

Tuan

    Member

  • Members
  • PipPip
  • 21 posts

Posted 11 November 2017 - 03:05 PM

Thank for your support

 

I must use TUniDBEdit because from http://forums.unigui...qty/#entry48017

If I use TUniDBEdit, value of column 4 from 200 will be update to 0 after I press tab (same value as I press enter).

 

But now problem is not edit in grid, Now my problem is new control base on TUniDBEdit which has trigger to show lookup dialog.

If field's onvalidation is called after call JSEventHandler (AEventName = 'Triggerclick'), I can disable onvalidation => show lookup => do something => re enable onvalidation at end.

But now field's onvalidation is called before call JSEventHandler.


  • 0

#6 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9815 posts

Posted 11 November 2017 - 04:32 PM

There is no difference between using a TUniEdit and a TUNiDBEdit. Both serve as an editor for Grid. When a DBEdit is used in a Grid it is no longer a DBEdit.


  • 0

#7 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9815 posts

Posted 11 November 2017 - 04:39 PM

Thank for your support

 

I must use TUniDBEdit because from http://forums.unigui...qty/#entry48017

If I use TUniDBEdit, value of column 4 from 200 will be update to 0 after I press tab (same value as I press enter).

 

But now problem is not edit in grid, Now my problem is new control base on TUniDBEdit which has trigger to show lookup dialog.

If field's onvalidation is called after call JSEventHandler (AEventName = 'Triggerclick'), I can disable onvalidation => show lookup => do something => re enable onvalidation at end.

But now field's onvalidation is called before call JSEventHandler.

 

If you are using uniGUI at this level then you need to get a license first.

 

Thanks


  • 0

#8 Tuan

Tuan

    Member

  • Members
  • PipPip
  • 21 posts

Posted 14 November 2017 - 07:52 AM

If you are using uniGUI at this level then you need to get a license first.

 

Thanks

 

Dear Farshad

 

I will do it in next month.

Now I had some problem with Unigui.

The first is http://forums.unigui...qty/#entry48017. Can I use UniEdit instead of UniDBEdit.

The second is DoSetRemoteValue is called before JSEventHandler. If I buy UniGui, Can I has solution to fix it?

 

Sorry for my English.

 

Tuan


  • 0

#9 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9815 posts

Posted 14 November 2017 - 06:02 PM

Hi,

 

uniDBGrid mimics a VCL grid in many ways, but it doesn't work well when you modify a db row dynamically when you jump from one cell to another.

I can not promise that we can resolve this. You need to find another workaround for time being.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users