CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Cancel selecting a row.

by zsleo » 25 May 2016 04:45

In a grid I do some validation in OnBeforeSelectRow.

If my validation fails I want to cancel selecting another row - and keep the current row selected.

How do I cancel the selection of another row?

TIA
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 25 May 2016 16:31

Hi zsleo,

It's only possible with javascript.
What do you need to check?

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 25 May 2016 20:35

The validation function is very complex involving data checking against other DB tables and is more than 300 lines of code and in addition checks field values of other rows in the grid's bound dataset.

So that is why I am looking for a method to cancel the row change change.

Can the Javascript you are thinking of be run when my procedure returns it's result.

TIA
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 27 May 2016 09:14

Hi zsleo,

The javascript event beforeSelectRow, should return the boolean True/False.
The problem, there is no way to send the result value in delphi event.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQGrid

cron

Who is online

Users browsing this forum: No registered users and 19 guests

Contact Us.