jQuery UI Widgets Forums Grid Edit Grid

This topic contains 24 replies, has 2 voices, and was last updated by  Martin 9 months ago.

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Edit Grid Posts
  • Edit Grid #102983

    dzimen
    Participant

    Hi, How I can do it? :

    I want edit via pop-up and click cells, because I has a input type checkbox. So I must click checkbox in cell.
    Second thing: How insert a script with function, which download current time to input in Edit pop-up? I has a input with date, where I must insert a current time, because this is time of edit. I has a script, which download current time:

    <script>
    document.getElementById(“date”).innerHTML = formatAMPM();

    function formatAMPM() {
    var d = new Date(),
    minutes = d.getMinutes().toString().length == 1 ? ‘0’+d.getMinutes() : d.getMinutes(),
    hours = d.getHours().toString().length == 1 ? ‘0’+d.getHours() : d.getHours(),
    seconds = d.getSeconds().toString().length == 1 ? ‘0’+d.getSeconds() : d.getSeconds(),
    ampm = d.getHours() >= 12 ? ‘ PM’ : ‘ AM’,
    months = [‘January’,’February’,’March’,’April’,’May’,’June’,’July’,’August’,’September’,’October’,’November’,’December’],
    days = [‘Sunday’,’Monday’,’Tuesday’,’Wednesday’,’Thursday’,’Friday’,’Saturday’];
    return days[d.getDay()]+’ ‘+months[d.getMonth()]+’ ‘+d.getDate()+’ ‘+d.getFullYear()+’, ‘+hours+’:’+minutes+’:’+seconds+ampm;
    }
    </script>

    I must insert to input in pop-up EDIT. Can you help me?

    Edit Grid #102987

    dzimen
    Participant

    Third thing: How I can add a href to button, which redirect to another site with data from selected row? Each row generate its ID? For example input edit has unique ID for ROW. I need this method to random button. Can you help me?

    Edit Grid #103019

    Martin
    Participant

    Hello dzimen,

    I have created an example of how you can edit the grid rows with a pop-up window and edit the the checkbox column by clicking in the cell.
    It is achieved by setting the grid to be editable and set editable: false on all columns except the one with the checkbox.
    There is also a date input field in the pop-up which is using your time function.
    Here is the Example.

    You can get the selected row index at any time by using the getselectedrowindex method of the grid.

    I hope that this would be useful!

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Edit Grid #103020

    dzimen
    Participant

    How can auto update when i change checkbox (true / false)? I add updaterow where commit(true) but didn’t work. Do I need add another code?

    Edit Grid #103021

    dzimen
    Participant

    I need show date in table. When I edit this row a date change to current time

    Edit Grid #103062

    Martin
    Participant

    Hello dzimen,

    If your need to update the grid’s data you should do this in the updaterow callback.
    There you can modify the localdata or send an ajax call to your server, if the data is coming from a database.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Edit Grid #103063

    dzimen
    Participant

    I need send to Database via JAVA

    Edit Grid #103068

    dzimen
    Participant

    Is there an example of writing data to a database using JAVA? Everywhere on the internet I see that it is using PHP. I have a Controller where I have Select elements and now I would have to add a function to UPDATE

    Edit Grid #103074

    Martin
    Participant

    Hello dzimen,

    You can check if some of the articles in the “Java Integration” section on our Documentation Page would be useful for you.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Edit Grid #103078

    dzimen
    Participant

    I create this: https://pastebin.com/RLQ082pE (updaterow.jsp)
    https://pastebin.com/rKc3CVEX (this add in table)

    When I try edit in popup data, Data not update. In console I have error 405 and show error in this line in console: https://zapodaj.net/80e44d295bd09.png.html

    I tryed move to Controller, but didn’t work (Don’t read a request.getParameter() )

    Edit Grid #103081

    Martin
    Participant

    Hello dzimen,

    It seems that the issue is on your server.
    Unfortunately, I am not proficient with Java and also it is not related with jQWidgets,
    so I would not be able to assist you with this.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Edit Grid #103083

    dzimen
    Participant

    On the server side, everything works well because the table data is extracted correctly using this method: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/java-integration/bind-jquery-grid-to-mysql-database-using-spring-mvc.htm

    Edit Grid #103099

    dzimen
    Participant

    This is my JSP: https://pastebin.com/kuisAePT
    All time after edit data show this: org.springframework.web.servlet.PageNotFound.handleHttpRequestMethodNotSupported Request method ‘POST’ not supported

    I tryed various of method (Controller – @RequestParam, Your method from documentation)… All time this same error

    Edit Grid #103118

    Martin
    Participant

    Hello dzimen,

    The pastebin that you have sent says it is not longer available.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Edit Grid #103164

    dzimen
    Participant

    This is current pastebin where it is a controller in JAVA: https://pastebin.com/R1aaz52R
    In JSP where is a GRID I have this: https://pastebin.com/d0puLPWs
    When I edit row and I want save, I see this error: org.springframework.web.servlet.PageNotFound.handleHttpRequestMethodNotSupported Request method ‘POST’ not supported. I need update database

    How I can resolve this?

Viewing 15 posts - 1 through 15 (of 25 total)

You must be logged in to reply to this topic.