Make the edit button invisible (because singleclick is used)

4
Hi Everybody, I have a Datagrid And some data in it The datagrid property "default button trigger" is set to "Single click" My Default button is the Edit-button with the form_newEdit form connected Is it possible to make invisible the edit-button (to save space)? I have found solution: "show control bar" proberty to false. This isn't a good solution for me, as I would still like to be able to search (and the "search button" is placed in this bar)... Something possible in CSS? I wonder!
asked
5 answers
2

What you can do is set "Show control bar" to "False" and set "Show search bar" to "Always". This way the control bars are hidden but the search fields and "search" and "Reset" buttons are visible

answered
2

Not the most fancy solution, but you can add a css class to your edit button and then in add this in your custom stylesheet:

But i'm really curious about how one button can save space for you.

Edit: Roberto, just add a css class to your datagrid and you can add this to your stylesheet:

.yourcssclass .tundra .mendix_Button_button  {
display:none !important;
}

This way only the buttons in this grid will be affected.

Edit after new post Roberto:

Roberto, Sorry, didn't know you had also a new and search button. I thought this was the only one. So that way you can remove the buttons in your datagrid.

Because you can't add a css-class @ button level, my solution won't work in your situation. It only works if you have one button on your grid.

If you really need this, you could create another form for with a new and search button, which will not apply the css styles. But this would be really crappy and not user friendly. If you don't want this, you could wait till Mendix adds the ability to add a css class on a button.

answered
0
  • Show search bar always is not an option: there is little vertical space (otherwise it would be an option, so thanks!)
  • The custom css class: would be a nice trick but how can I connect this css to the edit-button? --> the class and style property only seem to be available for a datagrid, not for a specific edit-button...

Additionally: In my case, the edit-button is a microflow trigger, but also normal edit-buttons don't seem to have these 2 properties...

Finally: My question may be (or seem) a little detail, but the other side is: Why would the edit-button be visible when you have single-click as default-button trigger? you will not have the chance to click on this button :-P

I wonder if there are options. The reason for my customer was space and the reason mentioned under "finally": the button seems useless

answered
0

Additionally: In my case, the edit-button is a microflow trigger, but also normal edit-buttons don't seem to have these 2 properties...

Finally: My question may be (or seem) a little detail, but the other side is: Why would the edit-button be visible when you have single-click as default-button trigger? you will not have the chance to click on this button :-P

How would a user know that a single click would let him edit the row?

But nvm that, i do agree that in some cases you wish to just remove the default button from the datagrid. If that is the case i suggest to file a feature request.

answered
0
.yourcssclass .mendixDataGrid_controlPane .mendixDataGrid_toolBarPane .mendix_Button_button
{
display:none !important;
}

Hi Samet,
- The exact copy of your code didn't work for me
- I changed it to the code above
- I set cssclass to yourcssclass (didn't rename it yet) in the datagrid property
- result: all my buttons are lost (search, new, edit) (only in the datagrid where I defined the style yourcssclass)
- The result I'd like to have is that only the edit-button disappears in this grid...

Were you able to get this?

PS:
I didn't know THIS usage of css (only knew

    .cssclass1, .cssclass2` 
{

}

etc to apply a style on multiple cssclasses. This one is also useful (to only apply the css to things that belog to the div with class "yourcssclass", so thanks!)

I wonder if you were able to keep the search button, new button and get rid of the edit button...

answered