Every checkbox has uniquie id which is combination of
“jqg_”+rowid – where the rowid is the id of the row.
You can use the following code to make it invisible
$(“#jqg_Q391”)..css(“visibility”, “hidden”);
I had to add this line in the setSelection method.
………………………………………………………………………………
if( $(“#jqg_”+pt[ 0 ].id).attr(“disabled”) ){
is there any update to this???
found this by Arka Chatterjee on stackoverflow:
Every checkbox has uniquie id which is combination of
“jqg_”+rowid – where the rowid is the id of the row.
You can use the following code to make it invisible
$(“#jqg_Q391”)..css(“visibility”, “hidden”);
outofsight said:
1) Id needs to be present in the edit form which it isnt, presumably as the field it not editable in the main grid
Sorted, my bad. editable: true in the wrong place 
This has of course left me with a few more questions.
1)
Thank you.
tim
the page isnt there
this topic solves my problem in my school project.. thank you very much. i wish someday i could be as good as you guys.
yeah it stayed at the current page but the data.. but it sorts all the data not the data within the selected page. is there any way to sort the data in the selected page?
for instance i have an alphabet table:
im in page 2 and the data in the table are-
p
s
t
r
and i want to sort those data and it would be like:
p
r
s
t
not like:
a
b
c
d
or
w
x
y
z
php file name: edit_user.php
<?
include('../connections/theConnection.php'); //connections
$newid = $_POST['id']; //row id. this is the id of the selected row
$uname = $_POST['uname']; //some variable
$pass = md5($_POST['pass']); //some variable
$email = $_POST['email']; //some variable
$fname = $_POST['fname']; //some variable
$mname = $_POST['mname']; //some variable
$lname = $_POST['lname']; //some variable
$cnumber = $_POST['cnumber']; //some variable
$level = $_POST['level']; //some variable
$operation = $_POST['oper']; //can be “add” “edit” “del”
if ($operation == “edit”)
{
$result = mysql_query(“UPDATE user_tbl SET uname = '$uname', fname = '$fname', mname = '$mname', lname = '$lname', email = '$email', pass = '$pass', cnumber = '$cnumber', level = '$level' WHERE uid = '$newid'”);
}
else if ($operation == “add”) {
$result = mysql_query(“INSERT INTO user_tbl(uname, fname, mname, lname, email, pass, cnumber, level, status) VALUES ('$uname', '$fname', '$mname', '$lname', '$email','$pass', '$cnumber','$level', 2)”);
}
else if($operation == “del”)
{
$result = mysql_query(“UPDATE user_tbl SET del = 2 WHERE uid = '$newid'”);
}
mysql_close($db);
?>
the javascript required:
jQuery(”#btn_add_edit”).click(function(){
var gr = jQuery(”#my_jqgrid”).getGridParam('selrow');
if( gr != null ) {
jQuery(”#my_jqgrid”).editGridRow(gr,{height:280,reloadAfterSubmit:true});
}
else {
jQuery(”#my_jqgrid”).editGridRow(”new”,{height:280,reloadAfterSubmit:true});
}
});
the html required:
SPAN { font-family: “Courier New”; font-size: 10pt; color: #000000; background: #FFFFFF; }A { text-decoration: none; font-weight: bold; color:#000000;}.S1 { color: #009300; background: #FFF7F7; }.S2 { color: #00008B; background: #FFF7F7; }<button type='submit' id='btn_add_edit'>ADD/EDIT
____________________________________________________________________________
my simple
2) There might only be one id in the grid, but the user must be able to select from all of the id's in the foreign table, so I guess I need to do another lookup on the foreign table
So I've found the docs on how to achieve point #2 but still struggling with #1
I have colModel set as:
name: 'resource_id',
index: 'resource_id',
hidden: true,
edithidden: true,
edittype: select,
editoptions: { value: “1:Resource1;2:Resource2” },
formoptions { editable: true}
Hi Tony,
I want to pass extra parameters to the server in addition to 'page','rows','sord','sidx'.
Please specify what should I do.
Regards,
Kedar
I'll try to explain again in a little more detail as my previous response doenst actually cover everything.
I have a grid that is generated from a table that for example looks like this (simplified a lot):
id: Integer which is a foreign key
name: varchar
When I declare the grid, the id is not editable, I do not want it to be changed for any existing rows.
When the user wants to add a new row I need to do two things…
1) Id needs to be present in the edit form which it isnt, presumably as the field it not editable in the main grid
2) There might only be one id in the grid, but the user must be able to select from all of the id's in the foreign table, so I guess I need to do another lookup on the foreign table?
Im just not sure how to achieve this, I can't be the only person to have needed to do this so I am guessing it's possible but my lack of knowledge is the problem here.
Thx m8 that was very helpful
JaySab said:
Hi,
I am having
ah yes – you're correct.
sorry…
🙂
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top