jQWidgets Forums
Forum Replies Created
-
Author
-
June 23, 2015 at 1:08 pm in reply to: To get all values of a particular column To get all values of a particular column #72905
Thanks Dimitar.It worked perfectly.
February 12, 2015 at 9:39 am in reply to: To remove group separator and decimals in number input To remove group separator and decimals in number input #66992Hi Nadezhda,
I tried your code but nothing is changing.
On blur the input content is getting reset to 0.00February 12, 2015 at 3:14 am in reply to: To remove group separator and decimals in number input To remove group separator and decimals in number input #66955Hi Nadezhda,
Thanks for the reply.Is it possible that on blur event only comma separators are added without any underscores.
February 4, 2015 at 1:14 pm in reply to: Row selection getting disabled on virtual scrolling with custom checkbox column Row selection getting disabled on virtual scrolling with custom checkbox column #66506Hi Peter,
I tried using selectionmode:’checkbox’ by removing all custom checkbox features.So,as per your previous comments this should work fine without corresponding boolean field being mapped to database table.
Following are my observations
1)Unlike the previous case the check marks are intact even after virtual scrolling.
2)I have a drop down option to clear checked rows.Now the selected rows are not getting unselected on selecting the drop down option.In my previous case it was getting unselected.
3)Similar to the case when custom checkbox was used, on virtual scrolling , the selected row data of rows selected previous to virtual scrolling are coming as null.I am fetching the row data in my java code using ajax on selecting “Assignment” drop down option.
Below is my code snippet
`
var ServerString=”http://cvg-000216b-006:9090/”;var source = {};
var dataAdapter = “”;
var editrow=-1;
var dropdownItem=””;
var columnCheckBox = null;
var updatingCheckState = false;$(document).ready(function () {
source =
{
datatype: “json”,
datafields: [
{ name: ‘RowId’ },
{ name: ‘LPID’ },
{ name: ‘InsuredName’ },
{ name: ‘LPSR_Coverage’ },
{ name: ‘LPC’ },
{ name: ‘LPC_Original’ },
{ name: ‘Requestor_FName’ },
{ name: ‘Requestor_LName’ }],
id: ‘LPID’,
filter: function () {$(“#jqxgrid”).jqxGrid(‘updatebounddata’,’filter’);
},
sort: function () {
$(“#jqxgrid”).jqxGrid(‘updatebounddata’, ‘sort’);
},
url: ServerString+”lpsr/WorkSpaceController”,updaterow: function (rowid, rowdata, commit) {
commit(true);
},cache: false,
};
dataAdapter = new $.jqx.dataAdapter(source, {
downloadComplete: function (data, status, xhr) { },
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});var dropdownsource=[
“Assignments”,
“Clear Checkboxes”,];
$(“#jqxDropDownList”).jqxDropDownList({
source: dropdownsource
});ShowResults();
$(‘#jqxDropDownList’).bind(‘select’, function (event) {
var args = event.args;
var item = $(‘#jqxDropDownList’).jqxDropDownList(‘getItem’, args.index);
dropdownItem=item.label;
var rowIndexes = $(‘#jqxgrid’).jqxGrid(‘getselectedrowindexes’);
var rowData= $(“#jqxgrid”).jqxGrid(‘selectedrowindexes’);
var rowIds = [];
var lpc=[];
var lpcOriginal=[];
var coverageCodes=[];
var reqFName=[];
var reLName=[];for (var i = 0; i < rowIndexes.length; i++) {
var currentId = $(‘#jqxgrid’).jqxGrid(‘getrowid’, rowIndexes[i]);
var currentLpc=$(‘#jqxgrid’).jqxGrid(‘getcellvalue’,rowData[i],”LPC”);
var currentLpcOrg=$(‘#jqxgrid’).jqxGrid(‘getcellvalue’,rowData[i],”LPC_Original”);
var currCoverageCode=$(‘#jqxgrid’).jqxGrid(‘getcellvalue’,rowData[i],”LPSR_Coverage”);
var currReqFName=$(‘#jqxgrid’).jqxGrid(‘getcellvalue’,rowData[i],”Requestor_FName”);
var currReqLName=$(‘#jqxgrid’).jqxGrid(‘getcellvalue’,rowData[i],”Requestor_LName”);
rowIds.push(currentId);
lpc.push(currentLpc);
lpcOriginal.push(currentLpcOrg);
coverageCodes.push(currCoverageCode);
reqFName.push(currReqFName);
reLName.push(currReqLName);};
if(dropdownItem==’Assignments’)
{
$.ajax({
type: “GET”,data: JSON.stringify({lpIds:rowIds,
lpcs:lpc,lpcOrig:lpcOriginal,covCodes:coverageCodes,
reqFName:reqFName,reqLName:reLName}),
url: ServerString+”lpsr/MailController”,success: function(data)
{
alert(“Mail sent successfully”);
$(“#jqxDropDownList”).jqxDropDownList(‘clearSelection’, true);
$(“.jqx-checkbox”).jqxCheckBox({ checked: false });},
error:function(data)
{
alert(“There was an error in sending mail or all the mails are not sent”);
$(“#jqxDropDownList”).jqxDropDownList(‘clearSelection’, true);
$(“.jqx-checkbox”).jqxCheckBox({ checked: false });}
});}
}
else
if(dropdownItem==”Clear Checkboxes”)
{$(“.jqx-checkbox”).jqxCheckBox({ checked: false });
$(“#jqxDropDownList”).jqxDropDownList(‘clearSelection’, true);
alert(“Checkboxes are cleared”);}
});
});
function ShowResults(){
$(“#jqxgrid”).jqxGrid(
{
width: ‘50%’,
height: ‘100%’,
source: dataAdapter,
columnsresize: true,
showfilterrow: true,
filterable: true,
autoshowfiltericon: true,
sortable: true,
editable: true,
altrows: true,
theme: ‘classic’,
editmode: ‘selectedcell’,
selectionmode: ‘checkbox’,
keyboardnavigation: true,
showemptyrow: false,
virtualmode: true,
columnsreorder: true,
rendergridrows: function () {
return dataAdapter.records;
},
columns: [
{ text: ‘RowId’, datafield: ‘RowId’, width: 150, editable: false,hidden:true },
{ text: ‘Insured Name’, datafield: ‘InsuredName’, width: 250, columntype: ‘textbox’,editable: true, sortable:true },
{ text: ‘Coverage’, datafield: ‘LPSR_Coverage’, width: 110, columntype: ‘textbox’,editable: true, sortable:true },
{ text: ‘LPC’, datafield: ‘LPC’, width: 45, columntype: ‘textbox’,editable: true, sortable:true },
{ text: ‘LPC Original’, datafield: ‘LPC_Original’, width: 50, editable: true, sortable:true},
{ text: ‘Req F Name’, datafield: ‘Requestor_FName’, width: 170, editable: true, sortable:true },
{ text: ‘Requestor_LName’, datafield: ‘Requestor_LName’, width: 110, columntype: ‘textbox’,editable: true, sortable:true }]
});
}February 3, 2015 at 2:18 pm in reply to: Row selection getting disabled on virtual scrolling with custom checkbox column Row selection getting disabled on virtual scrolling with custom checkbox column #66437Hi Peter,
Thanks for the reply.
Do you mean to say that in my database table i need to have another field of the type boolean. By mapping to that field,then only i can use the checkbox column(Irrespective of if i have default column with selectionmode: ‘checkbox’ or customised one to have it as one of the middle column)February 3, 2015 at 3:14 am in reply to: Row selection getting disabled on virtual scrolling with custom checkbox column Row selection getting disabled on virtual scrolling with custom checkbox column #66371Again,it seems i am not able to post links and here is the link i am referring to
February 3, 2015 at 3:12 am in reply to: Row selection getting disabled on virtual scrolling with custom checkbox column Row selection getting disabled on virtual scrolling with custom checkbox column #66370 -
AuthorPosts