jQWidgets Forums

jQuery UI Widgets Forums Grid How can jqxGrid render toolbar with jqxDatetimeInput within one row?

This topic contains 2 replies, has 2 voices, and was last updated by  douglas168 7 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • douglas168
    Participant

    Hi all,

    I am trying to add jqxDatetimeInput to jqxGrid toolbar but it keeps render with line break. How can jqxGrid render toolbar with jqxDatetimeInput within one row?

    Before inserting jqxDatetimeInput, all buttons and text are rendered within one row.

    Now with jqxDateTimeInput appended to toolbar, the toolbar is render with line break on ‘searchStartDate’ and ‘searchEndDate’ such that the toolbar is:

    <ADD>
    <SEARCHSTARTDATE>
    <SEARCHENDDATE>
    <SEARCHBOX><SEARCHBUTTON><CLEARFILTERINGBUTTON><EXCELEXPORT>

    below is part of the jqxGrid code:
    #####################
    # CODE
    #####################

    rendertoolbar: function (toolbar) {
    var container = $(“<div style=’margin: 5px;’></div>”);
    toolbar.append(container);
    container.append(‘<input style=”margin-left: 20px;” id=”addrowbutton” type=”button” value=”ADD” />’);
    container.append(‘<input style=”margin-left: 20px;” id=”searchStartDate”/>’);
    container.append(‘<input style=”margin-left: 20px;” id=”searchEndDate”/>’);
    container.append(‘<input style=”margin-left: 20px;” id=”searchbox” type=”text” />’);
    container.append(‘<input style=”margin-left: 1px;” id=”searchbutton” type=”button” value=”SEARCH” />’);
    container.append(‘<input style=”margin-left: 5px;” id=”clearfilteringbutton” type=”button” value=”SHOW ALL” />’);
    container.append(‘<input style=”margin-left: 50px;” id=”excelExport” type=”button” value=”EXPORT TO EXCEL” />’);

    $(“#addrowbutton”).jqxButton({template: ‘success’, height: ’30px’, width: ’80px’});
    $(“#searchStartDate”).jqxDateTimeInput({
    theme: ‘fresh’,
    width: ‘100px’, height: ’20px’, formatString: “yyyy-MM-dd HH:mm:ss”, showTimeButton: false
    });
    $(“#searchEndDate”).jqxDateTimeInput({
    theme: ‘fresh’,
    width: ‘100px’, height: ’20px’, formatString: “yyyy-MM-dd HH:mm:ss”, showTimeButton: false
    });


    Hristo
    Participant

    Hello douglas168,

    I would like to suggest you look at this example:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/toolbar.htm?light
    You could try to use this approach to implement there the jqxDateTimeInput.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    douglas168
    Participant

    Thank you again Hristo! I used the example to redo the toolbar and it is working now. Appreciate the help!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.