3/19/2024 0 Comments Create button in grid scriptcaseWhen executed inside the events of a grid (e.g. And, as I said, ScriptCase also uses $_SESSION to store the state of the applications. Solutionįor better or for worse, ScriptCase is heavily dependant on PHP’s $_SESSION global, using it to store a lot (and I mean it!) of information: general and database settings, states of applications, dictionary of (language) strings, errors status, and even HTML content for things such as buttons. With that in mind, I had to find out for myself a way to present a different content for that column when exporting to XLS.Īfter some time analysing the code generated by ScriptCase I found out how to detect what triggered the onRecord event - and it also works for PDF, CSV, XML and RTF. To this day, ScriptCase (latest is v9.0.029) doesn’t provide any macro or documented steps to check if onRecord event is running for a “normal grid webpage” or for an exportation. Besides not working as expected, that image/icon wasn’t really desired inside the XLS file and for this case a simple text would be much better: it would allow the status to be used in formulas, functions, searches, etc. When exported to XLS using ScriptCase’s exporting option, the status column showed just an empty cell - and no images at all. In the onRecord event I checked the status and set the content of that column - an IMG tag, i.e., plain HTML - and everything worked fine, except when exporting that grid to XLS (or PDF). how about for a 100 or more grid apps having a built in copy and delete buttons in grid app will greatly save time. A while ago I created a grid application using ScriptCase to list all not-completed orders, and because each order could have different status, I added a column to show an image/icon based on its status: Well that means creating your own button for each of grid apps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |