rado
Posts: 221
|
| Posted: 07/17/2009, 12:25 PM |
|
Hi,
I have grid and in one of the column there are "method_id" (first db table) as text box control and "method_name" (second db table) as label control. What I usually do to get the name for "method_name" label (separate DB table) control is:
1. In "Before Show Event" for "method_id" control I set "Save Control Value" as variable.
2. In "Before Show Event" for "method_name" I set first "Retrieve Value for Control" using the source name (variable) set in step #1.
3. After that in "Before Show Event" for "method_name" as second action I set DLookup using variable name created in step #1 and retrieved in step#2.
This practice worked in 99% of all my cases without any problem.
What's happened in last 2 grids that I created is that the value of "method_id" from first record (row) was used for "method_name" of the second record (row), then value of "method_id" from second record (row) was used for "method_name" of the third record (row) and so on.
Since I'm in the critical phase of my project, PLEASE respond ASAP.
Thanks you very much for help
Rado
|
 |
 |
rado
Posts: 221
|
| Posted: 07/17/2009, 12:46 PM |
|
I'm afraid that this is a bug in CCS. Inaddition when I run my grid with for example 25 records total, I have the issue with first record in page. For example if I select 10 record per page the issue is on first row on first page and first row on the second page. If I select 25 records per page then I have issue just with first record on (25 records) page.
Thanks
Please give me advice?
Rado
|
 |
 |
damian
Posts: 838
|
| Posted: 07/18/2009, 4:37 AM |
|
rado - im really not sure i follow everything you are saying.... but i think you have a problem with the timing of your events....
Quote :1. In "Before Show Event" for "method_id" control I set "Save Control Value" as variable.
i dont think there will be a value saved because you are saving it in before show....
i think everything is mucked up because of this...
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
rado
Posts: 221
|
| Posted: 07/18/2009, 7:07 AM |
|
Thanks a lot damian,
But in same grid I have another controls which I retrieve the values on the same way and it works just fine. For one control I have just two events: "Before Show" and "On validate". I tried also to run same action in "Before Show" event of the grid (not control itself) but I'm getting same results.
Another thing that I checked is : "Is value available in control which I save the value from" and it is.
No idea where could be the problem.
Thanks again,
Rado
|
 |
 |
damian
Posts: 838
|
| Posted: 07/18/2009, 5:49 PM |
|
is there a default value in method_id? if not there cant be any value in there in before show...
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
rado
Posts: 221
|
| Posted: 07/20/2009, 1:52 PM |
|
Sorry damian to not respond earlier. I didn't have enough nerves with this any more and changed the control to list-box and made it read-only, so I got correct data in my grid. (It doesn't looks so nice as label, however more important thing is data)
Thanks for help.
Rado
|
 |
 |