Jump to content

Grid edit by default


Recommended Posts

Hello, 

We'd like to do the same but with the bulk edit option. 

We tried this script but it is not working: 

<script type="text/javascript">
  document.addEventListener("DOMContentLoaded", function() {
    var bulkEditOption = document.querySelector("#ListOrEditRadioGroup [value='EditMultiple']");
    bulkEditOption.checked = true;
  });
</script>

Thank you for any help you can provide!

Link to comment
Share on other sites

Hello,

I'm so close... my page opens in grid edit mode and my field widths are good... but I have a wrinkle: 

I have a non-editable HTML column in the table.  It renders perfectly in view mode.  When in grid edit mode it appears as text (i.e., it shows the html tags rather than rendering them).  I would really like this to continue to render as non-editable html.  

Would love suggestions!

My current code is below:

 

<script>

document.addEventListener("DataPageReady", function(e){

var gridEditButton = document.querySelector("a[data-cb-name='GridEditButton']");
   
gridEditButton.click();

});

</script>
<style>
/*adjust the header of the grid edit*/
div[class="HeadCtnr"] th:nth-child(1) {
width: 200px !important;
}
div[class="HeadCtnr"] th:nth-child(2) {
width: 200px !important;
}
div[class="HeadCtnr"] th:nth-child(3) {
width: 200px !important;
}
div[class="HeadCtnr"] th:nth-child(4) {
width: 800px !important;
}

/*adjust the content of the grid edit*/
div[class="BodyCtnr"] th:nth-child(1) {
width: 200px !important;
}

div[class="BodyCtnr"] th:nth-child(2) {
width: 200px !important;
}

div[class="BodyCtnr"] th:nth-child(3) {
width: 200px !important;
}

div[class="BodyCtnr"] th:nth-child(4) {
width: 800px !important;
}

select[id^="InlineEditdppUmbSvcActivation"]{
  width: auto !important;
}

div[class^="Data"] {
  width: auto !important; 

  height: auto !important;
}
  
</style>

Link to comment
Share on other sites

  • 4 weeks later...
On 6/10/2023 at 2:25 AM, APTUS said:

Hello @oliverk, did you get the issue with the flashing regular tabular report before the grid edit mode shows on the page sorted out? I am having the same exact issue and any help or guidance will be appreciated. Thanks.

Alas no - let me know if you manage to solve it!

Link to comment
Share on other sites

I imagine you can do this by hiding the regular table.

image.png.34161fff108cbdb87d499976e6093814.png

Create a CSS rule (or as many as you need) to hide the elements that belong to the normal report. I used .cbTableDefaultCellspacing in my Header, like so:

.cbTableDefaultCellspacing {
  display: none !important;
}

This hides the report as soon as the user visits the page. It does not affect the Grid Edit version of the report. So, when the workflow in this post clicks the Grid Edit button, the Grid Edit report will show up without the normal report flashing.

Link to comment
Share on other sites

@kpcollier, thanks for your suggestion above. While I wasn't able to use your exact selector to get rid of the "flashing regular tabular report before grid edit," you gave me the idea and I was able to make it work with a different class selector. The CSS that I am using is shown below. Also, @oliverk, this may help you. I simply placed this CSS Style as the very first item in the header (to make sure it runs and hides the tabular report before anything else runs) and so far so good. When I open the datapage, there is a very short delay before the grid edit mode shows up, but fortunately only a blank white screen is now showing during that delay.

 

<style>
.cbResultSetTable { 
  	display: none !important;
  }
<style>

 

Link to comment
Share on other sites

  • 10 months later...
On 6/16/2023 at 4:03 AM, APTUS said:

@kpcollier, thanks for your suggestion above. While I wasn't able to use your exact selector to get rid of the "flashing regular tabular report before grid edit," you gave me the idea and I was able to make it work with a different class selector. The CSS that I am using is shown below. Also, @oliverk, this may help you. I simply placed this CSS Style as the very first item in the header (to make sure it runs and hides the tabular report before anything else runs) and so far so good. When I open the datapage, there is a very short delay before the grid edit mode shows up, but fortunately only a blank white screen is now showing during that delay.

 

<style>
.cbResultSetTable { 
  	display: none !important;
  }
<style>

 

A belated thanks - this is great!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...