jQWidgets Forums
Forum Replies Created
-
Author
-
yes exactly problem is that?? Please help me dimiter
but i need the editable grid row will be auto save in the database when clicking the another row
but i need when i save the data into the database the dialog will not be close …….and that save button is in the middle of the dialog where the upper part of dialog contain the form which i want to save the data and the lower part of that save button contains the jquery grid which i save from the save button .
Thanks Dimiter,
I say,in my second dialog box there is the simple form and that data will be save in the database when click the save in second dialog and the first dialog contains the grid which contain that database value.I need the first dialog database will be refresh but that dialog will not be close,…but that dialog(second dialog box) box only display when i click the grid rows items of the first dialog box.Help me please…how to insert the save,edit,delete and others buttons inside the dialog contain areas.when i insert this type of button inside the dialog box it cant performs any action
how to insert data from the dialog when i click the save button but the dialog will not be close while i insert the data.
$(document).ready(function(){
$(“#admission”).jqxButton({them:’energyblue’});
var student_detail=
{
datatype:”json”,
datafields:[
{name:’student_id’,type:’int’},
{name:’student_fname’,type:’string’},
{name:’student_lname’,type:’string’},
{name:’student_grade’,type:’string’},
{name:’student_rollno’,type:’string’}
],
id:’student_id’,
url:””,
};
var dataAdapter = new $.jqx.dataAdapter(student_detail, {
downloadComplete: function (data, status, xhr) { },
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
$(“#admission_grid”).jqxGrid(
{
theme: ‘energyblue’,
selectionmode: ‘singlerow’,
rowNum:5,
pagesizeoptions:[’10’,’15’,’20’,’40’],
columns:[
{text:’First Name’,datafield:’student_fname’,width: 90},
{text:’Last Name’,datafield:’student_lname’,width: 90},
{text:’Grade’,datafield:’student_grade’,width: 50},
{text:’Roll NO’,datafield:’student_rollno’,width: 40}
]});
$(“#admission_grid”).on(“rowdoubleclick”, function () {
//var id = $(“#admission_grid”).jqxGrid(‘getrowid’,selectedrowindex);
var selectedrowindex = $(“#admission_grid”).jqxGrid(‘getselectedrowindex’);
var rowscount = $(“#admission_grid”).jqxGrid(‘getdatainformation’).rowscount;
var data=$(“#admission_grid”).jqxGrid(‘getrows’)[selectedrowindex];
$(‘#f_name’).val(data.student_fname);
$(‘#lastName’).val(data.student_lname);
$(‘#grade’).val(data.student_grade);
$(‘#rollNo’).val(data.student_rollno);
$(‘#student_id’).val(data.student_id);
});$(“#admission”).click(function (){
$(‘#admisssion’)[0].reset();
showAdmission(‘Admission::’);
});
//for the student fees details
var service_detail=
{
datatype:”json”,
datafields:[
{name:’service_code’,type:’int’},
{name:’service_detail’,type:’string’},
{name:’service_charge’,type:’string’}
],
id:’service_code’,
url:””,
};
var dataAdapter_fees = new $.jqx.dataAdapter(service_detail, {
downloadComplete: function (data, status, xhr) { },
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
$(“#admission_grid_fees”).jqxGrid(
{
theme: ‘energyblue’,
width: 200,
height:487,
rowNum:5,
pagesizeoptions:[’10’,’15’,’20’,’40’],
columns:[
{text:’ID’,datafield:’service_code’,width: 20},
{text:’Fee Description’,datafield:’service_detail’,width: 115},
{text:’Charge’,datafield:’service_charge’,width: 65},
]});
########## i need here the double click events only if the (student_id) value is already send or the (admission grid ) row was already clicked(selectdd ) #########
$(“#admission_grid_fees”).on(“click”, function () {var selectedrowindex = $(“#admission_grid_fees”).jqxGrid(‘getselectedrowindex’);
var rowscount = $(“#admission_grid_fees”).jqxGrid(‘getdatainformation’).rowscount;
var data=$(“#admission_grid_fees”).jqxGrid(‘getrows’)[selectedrowindex];
$(‘#service_code’).val(data.service_code);});
});
function showAdmission(title)
{
dialog=$(‘#add_fees’).dialog({
modal: true,
‘title’: title,
dialogClass: “no-close”,
resizable: false,
height:600,
width: 1050,
show: “slow”,
draggable:true,
position:’center’,
hide: “size”,
buttons: [/*{ text: “Save”, click: function() {$( this ).find(‘form#addData’).submit(); } },*/
{text: “Ok”, click: function() {$( this ).dialog( “close” );}}]
});
}The second grid row only throw(i.e when the second grid row was click) the pupup dialog when the first grid already selected
That is good but,i am trying to retrieve the value from first grid.iff the second grid is already selected.other wise the second grid row click events do not give me any response…
Thanks peter ,
i use
$(“#admission_grid”).on(“click”, function () {var selectedrowindex = $(“#admission_grid”).jqxGrid(‘getselectedrowindex’);
var rowscount = $(“#admission_grid”).jqxGrid(‘getdatainformation’).rowscount;
var data=$(“#admission_grid”).jqxGrid(‘getrows’)[selectedrowindex];
$(‘#f_name’).val(data.student_fname);
$(‘#lastName’).val(data.student_lname);
$(‘#grade’).val(data.student_grade);
$(‘#rollNo’).val(data.student_rollno);
$(‘#student_id’).val(data.student_id);
});
it also display the value ,is this right? & i am confuse in the getcellvalue please tell me about this.thanks peter ,but Mr peter i am trying to upload the file from the form .so how to upload that file into the particular folder ??
but i am trying to upload the file from the dialog box with different fields in the dialog all the data are inserted but my chosen file is not uploaded from the dialog please help me??
my upload code was like
what can i do to upload the file ??sorry !! i am trying to upload the file from the dialog . where my dialog contain the form
for eg. <input type=”file” name=”userfile” size=”30″ id=”userfile”/>
-
AuthorPosts