colombiaactiva Posted February 26, 2015 Report Share Posted February 26, 2015 Hi, I have a datapage, a tabular report. And I want to have the "grid edit" view as default when I open it. It is deployed in a HTML page. Right now, when the page open, I have to click each time on the "grid edit" botton. anyway to open it by default like this? thanks a lot! Olivier Quote Link to comment Share on other sites More sharing options...
Jan Posted February 27, 2015 Report Share Posted February 27, 2015 Hello Olivier, Welcome to Caspio Forum! I think, you can use the following Java Script code (you can add Header&Footer element to the Result Page of your DataPage, select the Footer element, click the "Source" button and enter the code): <script type="text/javascript">function f_dispatchEvent(v_element, v_type){ ///<summary></summary> ///<param name="v_element" type="HTMLElement"></param> ///<param name="v_type" type="String"></param> if(v_element.dispatchEvent) { //var v_e = new Event(v_type); var v_e = document.createEvent('MouseEvents'); v_e.initEvent(v_type, true, true); v_element.dispatchEvent(v_e); //new Event(v_type, {"bubbles":true, "cancelable":true}) } else if(v_element.fireEvent){ v_element.fireEvent('on' + v_type); } }; setTimeout(function(){ var v_element = document.getElementsByName("GridEditButton")[0]; f_dispatchEvent(v_element, "click"); }, 5); </script> I hope, it helps. Also you can add your idea to the Ideabox. From my point of view, it is a very good idea. Quote Link to comment Share on other sites More sharing options...
colombiaactiva Posted February 27, 2015 Author Report Share Posted February 27, 2015 Hi Jan! Thank you for the welcome. yes I am knew at Caspio :-) I thought I was missing a stupid botton that I should click but couldn't find. I see there is no such botton. thanks a lot for your great answer, it works perfectly! I will suggest it in the ideabox as per your suggestion. now I have to figure out how to change the size of columns as I am having trouble with it thanks again, Olivier Quote Link to comment Share on other sites More sharing options...
Jan Posted February 27, 2015 Report Share Posted February 27, 2015 You are very welcome, Olivier! If it is hard to find anything in How To - you can ask here and I believe, somebody answers with the link or instructions. Quote Link to comment Share on other sites More sharing options...
Carlson Posted May 20, 2016 Report Share Posted May 20, 2016 Jan, I tried using the script but it is not working. Has a Caspio enhancement since caused the script to not work? I believe it was working before. Quote Link to comment Share on other sites More sharing options...
PeterER8 Posted May 23, 2021 Report Share Posted May 23, 2021 Having same issue as @Carlson Quote Link to comment Share on other sites More sharing options...
sandy159 Posted May 24, 2021 Report Share Posted May 24, 2021 Hello @PeterER8, If you want to make the Grid Edit to display as Default upon load, you may find the following forum post helpful: Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.