How to change position of buttons?

How to change position of buttons?

ilazycoderilazycoder Posts: 12Questions: 2Answers: 0

I have some custom buttons. Like Add New, PDF, CSV etc. I want these button in different positions. I have no problem to create button. But how can I give them position like the above image?

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    You can use dom to position controls. Also, you if you create the Buttons manually, you can position them anywhere, see example here.

    Colin

  • ilazycoderilazycoder Posts: 12Questions: 2Answers: 0

    Okay Thank you.

    But I want to make Excel PDF Print dropdownable.

    I write code. It is working on jsfiddle but not in my Laravel Program. Can't find solution for search Label and this button problem.

    Button:

    var opts = '';
    opts = opts + "<option value='excel'>"+ "Excel" + "</option>";
    opts = opts + "<option value='pdf'>"+ "PDF" + "</option>";
    opts = opts + "<option value='print'>"+ "Print" + "</option>";
    
    var select = "<select>" + opts + "</select>";
    console.log(select);
    $(select).insertAfter( "#datatablePermissionID_filter" );
    

    But if I make a real dom in HTML then it is working.

    Search Label:

    language: {
          url: languages['{{ app()->getLocale() }}'],
          search: ' ',
          searchPlaceholder: 'Search...'
    }
    
  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    If you are using our Buttons library (which I'm not certain you are from the above code), then you could use a collection button.

    Without a test case, its hard to say much more than that though.

    Allan

  • invescinvesc Posts: 1Questions: 0Answers: 0

    Hello, What I must to do if i want to add select with option in buttons panel?

This discussion has been closed.