Sorry to ask this yet again...I know it has been discussed a lot, but I've searched for several hours and can't find it. Maybe one of you can point me to it or just tell me the answer.
I have two independent grids in a page in a tabbed UI. One grid, "job_selected", just shows one row of data indicating the selected job. The second grid, "job_select" is a list of jobs and has a "select" button on each row to pick a job and make it the selected job. So, the user comes to the page, searches in job_select for the job and clicks the button. I do an ajax callback to set a session variable and then use that session variable to filter job_selected and all the rest of the grids and pages. That works, but I can't get the job_selected grid to refresh. If I refresh the page manually, I can see the selected job, but I just want to refresh the grid from the button.
So, in grid "job_select" is a button that runs the Xbasic callback function "selectJob" that sets
e.session.__protected__jobid = e.currentRowKeys[1]
Then, I think, in the callback, I want to set a flag in a JavaScript variable that says the callback has been run, so I tried
selectJob = "sjCallbackFlag = true;"
and
selectJob = "var sjCallbackFlag = true;"
Then in the afterAjaxCallbackComplete system event, I want to check the flag, do the refresh and set the flag to false. Here my JavaScript fails me... I entered
if (svRunFlag == true) {
JOB_SELECTED_GridObj.refresh();
svRunFlag = false;
}
I don't get any errors, but nothing happens. I'd appreciate some help.
Pat
I have two independent grids in a page in a tabbed UI. One grid, "job_selected", just shows one row of data indicating the selected job. The second grid, "job_select" is a list of jobs and has a "select" button on each row to pick a job and make it the selected job. So, the user comes to the page, searches in job_select for the job and clicks the button. I do an ajax callback to set a session variable and then use that session variable to filter job_selected and all the rest of the grids and pages. That works, but I can't get the job_selected grid to refresh. If I refresh the page manually, I can see the selected job, but I just want to refresh the grid from the button.
So, in grid "job_select" is a button that runs the Xbasic callback function "selectJob" that sets
e.session.__protected__jobid = e.currentRowKeys[1]
Then, I think, in the callback, I want to set a flag in a JavaScript variable that says the callback has been run, so I tried
selectJob = "sjCallbackFlag = true;"
and
selectJob = "var sjCallbackFlag = true;"
Then in the afterAjaxCallbackComplete system event, I want to check the flag, do the refresh and set the flag to false. Here my JavaScript fails me... I entered
if (svRunFlag == true) {
JOB_SELECTED_GridObj.refresh();
svRunFlag = false;
}
I don't get any errors, but nothing happens. I'd appreciate some help.
Pat
Comment