jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Edit Grid
Tagged: current datetime, datetime, edit, edit checkbox, edit pop-up, grid
This topic contains 24 replies, has 2 voices, and was last updated by Martin 6 years, 4 months ago.
-
AuthorEdit Grid Posts
-
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?
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?
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 seteditable: 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,
MartinjQWidgets Team
http://www.jqwidgets.com/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?
I need show date in table. When I edit this row a date change to current time
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,
MartinjQWidgets Team
http://www.jqwidgets.com/I need send to Database via JAVA
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
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,
MartinjQWidgets Team
http://www.jqwidgets.com/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() )
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,
MartinjQWidgets Team
http://www.jqwidgets.com/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
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 supportedI tryed various of method (Controller – @RequestParam, Your method from documentation)… All time this same error
Hello dzimen,
The pastebin that you have sent says it is not longer available.
Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/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 databaseHow I can resolve this?
-
AuthorPosts
You must be logged in to reply to this topic.