PDA

View Full Version : cDbCJGrid show or not shown record problems.



phvwijk
22-Dec-2015, 08:06 AM
Hi,

I have a fairly simple view with a cDbCJGrid showing data limited by a non data aware header.

9607

The combo and year determine the constraint for the grid. The onChange in both controls rebuild the constraints in the DD and send a MoveToFirstRow.
When the view comes on screen The following is happening

onConstrain in the dd is called. Because there is a 0 default for the year It create a constrain in the dates 01/01/2000 and 31/12/2000. So the gird is constrained at the moment. The country default is "All" so will show all countries.
The spinform in activated and sets it tio the current year which fires the onchange and rebuild the constraints.



Then I have 2 ways. One I am using the old way of constraining and the second way is to use SQL Filters.

The df constraints

Gives and error

9608

Click ok and it will show the correct result


The sql filter:

Has a nice result

9609
Using ctrl+home give the correct result

Both are not correct, even have different results.


Peter

Oscar
22-Dec-2015, 04:33 PM
Peter,

you might want to look at the following thread: http://support.dataaccess.com/Forums/showthread.php?57650-Grid-Refresh&highlight=movetofirstrow

Regards,
Oscar Mintegui

phvwijk
22-Dec-2015, 07:26 PM
oscar,

This is windows based not web interface,

Peter

Evertjan Dondergoor
23-Dec-2015, 05:13 AM
Similar setups work fine for me in both 18.1 en 18.2 beta. It could very well be something on yuor code. Maybe try to reproduce it in one of the samples.

Oscar
23-Dec-2015, 09:13 AM
Sorry, didn't dig into enough...

Oscar