jQWidgets Forums
Forum Replies Created
-
Author
-
Yes Peter i have already import scroll panel and buttons files..
but its not working…..nothing showing on my screen..
when i remove panel file so it shows list but without scroll…
what should i do?November 28, 2012 at 3:51 pm in reply to: How to delete row from grid How to delete row from grid #11622Peter I need help…
now i can update data using php in jquery but i m not able to delete row from data grid…
thats php script$row[‘name’],
‘id’ => $row[‘id’]);
}echo json_encode($certificate);
}
?>and thats jquery code
$(document).ready(function () {
// prepare the data
var data = {};
var theme = ‘classic’;var source =
{
datatype: “json”,
datafields: [
{ name: ‘name’},
{ name: ‘id’}
],
id: ‘id’,
url: ‘data_qualification.php’,
updaterow: function (rowid, rowdata, commit) {
// synchronize with the server – send update command
var data = “update=true&name=” + rowdata.name;// + “&LastName=” + rowdata.LastName + “&Title=” + rowdata.Title;
/// data = data + “&Address=” + rowdata.Address + “&City=” + rowdata.City + “&Country=” + rowdata.Country + “&Notes=””;
data = data + “&id=” + rowdata.id;$.ajax({
dataType: ‘json’,
url: ‘data_qualification.php’,
data: data,
success: function (data, status, xhr) {
// update command is executed.
commit(true);
},//for delete row
deleterow: function (rowid, commit) {data = data + “&id=” + rowdata.id;
// synchronize with the server – send delete command
// call commit with parameter true if the synchronization with the server is successful
//and with parameter false if the synchronization failed.commit(true);
}
});
}
};var dataAdapter = new $.jqx.dataAdapter(source);
// initialize jqxGrid
$(“#jqxgrid”).jqxGrid(
{
width: 280,
height: 350,
selectionmode: ‘singlecell’,
source: dataAdapter,
theme: theme,
editable: true,
columns: [
{ text: ‘ID’, editable: false, datafield: ‘id’, width: 100 },{ text: ‘ Certificate Name’, datafield: ‘name’, width: 180 }
]
});
});// delete row.
$(“#deleterowbutton”).bind(‘click’, function () {
var selectedrowindex = $(“#jqxgrid”).jqxGrid(‘getselectedrowindex’);
var rowscount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
if (selectedrowindex >= 0 && selectedrowindex < rowscount) {
var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
var commit = $("#jqxgrid").jqxGrid('deleterow', id);
}
});i know there is some mistake…
waiting for answer..
REgards…
FarhadNovember 28, 2012 at 3:19 pm in reply to: How to delete row from grid How to delete row from grid #11612Thans Peter…
You are owsum…u know me doing work on my final year project…
Jquery is intrestingthanks onceagain..
November 27, 2012 at 1:26 pm in reply to: How to merge two Jquery function How to merge two Jquery function #11549Hi Peter..
i have loaded all the files but its not working..
could u please explain?
Regards..
Farhad -
AuthorPosts