jQWidgets Forums
Forum Replies Created
-
Author
-
October 30, 2013 at 7:05 am in reply to: Grid column : Delete icon at header level and checkboxes at row level ??? Grid column : Delete icon at header level and checkboxes at row level ??? #31588
Problem solved … with combination of “renderer” and “rendered”.
Thanks
October 30, 2013 at 2:57 am in reply to: Display problem with "showvalidationpopup" Display problem with "showvalidationpopup" #31573Hi
It’s simple, popup message should be shown when :
Validation in on checkbox status … if user selects “checkbox” but Quantity field value is ZERO then popup should be like “Enter value ..”
It’s all working .. but …
When you have more rows, when you scroll and doing above action not showing popup at right place …
var theme = ‘web’;
var editedRows = new Array();
var source = {
datafields: [
{ name: ‘selected’, type: ‘bool’ },
{ name: ‘productcode’, type: ‘string’ },
{ name: ‘description’, type: ‘string’ },
{ name: ‘supplier’, type: ‘string’ },
{ name: ‘price’, type: ‘string’ },
{ name: ‘uom’, type: ‘string’ },
{ name: ‘qty’, type: ‘string’ }
],
datatype: “json”,
url: ‘Products.json’,
id: ‘productcode’
};var cellsrenderer = function (row, column, value, defaultHtml) {
return “”;
}var dataAdapter = new $.jqx.dataAdapter(source, {
downloadComplete: function (data, status, xhr) { },
loadComplete: function (data) {
},
loadError: function (xhr, status, error) { alert(‘Data load error !!!’);}
});// initialize jqxGrid
$(“#jqxgrid”).jqxGrid({
width:’650′,
height:’400′,
source: dataAdapter,
editable: true,
theme: theme,
selectionmode: ‘none’,
editmode: ‘click’,
enablehover: true,
columns: [
{ text: ”, datafield: ‘selected’, menu: false, sortable: false, editable: true, columntype: ‘checkbox’, width: 10 ,
renderer: function () {
return ‘‘;
}
},
{ text: ‘Code’, datafield: ‘productcode’, editable: false,width: 70},
{ text: ‘Description’, datafield: ‘description’, editable: false, width: 235},
{ text: ‘Supplier’, datafield: ‘supplier’, editable: false, width: 125},
{ text: ‘Price / Unit’, datafield: ‘price’, editable: false, width: 70, align: ‘right’, cellsalign: ‘right’},
{ text: ‘Qty’, datafield: ‘qty’, width: 70, editable: true, cellsalign: ‘right’, align: ‘center’, columntype: ‘numberinput’, cellsrenderer:cellsrenderer},
{ text: ‘UoM’, datafield: ‘uom’, columntype: ‘textbox’, editable: false}
]});$(“#jqxgrid”).on(‘cellvaluechanged’, function (event) {
var row = event.args.rowindex;
var dataField = event.args.datafield;
var value = event.args.value
var datarow = $(“#jqxgrid”).jqxGrid(‘getrowdata’, row);//if checkbox checked
if(value === true){
$(“#jqxgrid”).jqxGrid(‘selectrow’, event.args.rowindex);
if (parseInt(datarow.qty) <= 0) {
$("#jqxgrid").jqxGrid('showvalidationpopup', event.args.rowindex, "qty", "Enter Quantity for selected product.");
}
}
});October 30, 2013 at 12:34 am in reply to: adjust jqxgrid height automatically adjust jqxgrid height automatically #31557$(window).height() helps to adjust height of grid
October 30, 2013 at 12:34 am in reply to: adjust jqxgrid height automatically adjust jqxgrid height automatically #31556problem solved.
October 29, 2013 at 12:37 pm in reply to: Grid column : Delete icon at header level and checkboxes at row level ??? Grid column : Delete icon at header level and checkboxes at row level ??? #31533perfect,
I have written like …
{ text: ”, datafield: ‘incart’, threestatecheckbox: false, columntype: ‘checkbox’, width: ‘5%’, renderer: function () {
return ““;
}
}Image appearing at header level followed by ‘check boxes”
but following event is not firing to delete selected items …
$(“#delete”).click(function(e){ alert(‘clecked’); }
Please help.
Thanks
October 29, 2013 at 10:11 am in reply to: Error message disapprearing in grid having % coumn width Error message disapprearing in grid having % coumn width #31518Thanks for your reply … just to recap … grid width and column width must be %, then validation / popup error messages disappearing when we resize screen ..
code something like …
$(“#jqxgrid”).jqxGrid({
width:’100%’,
…….
{ text: ‘Supplier’, datafield: ‘supplier’, editable: false, width: ‘15%’},
……..
{ text: ‘Qty’, datafield: ‘qty’, width: ‘12%’, editable: true, cellsalign: ‘right’, align: ‘center’, columntype: ‘numberinput’,
validation: function (cell, value) {
return { result: false, message: “Quantity entered for selected product is invalid.” };
}
}
……………..
}October 28, 2013 at 6:48 pm in reply to: how to hise error message displaying by "showvalidationpopup" how to hise error message displaying by "showvalidationpopup" #31479Hi
Thanks for your reply, but is there a way of hiding specific popup ?
Thanks
October 28, 2013 at 6:47 pm in reply to: Error message disapprearing in grid having % coumn width Error message disapprearing in grid having % coumn width #31478Yes, It was working as expected if we have not mentioned jgrid width:100%, If i delete width property of grid then it’s being occupying the area of targeted area so i must specify width at grid level … at the same time i would like to mention width in % not in px for grid.
Thanks
October 25, 2013 at 9:14 pm in reply to: Checkbox validation on row select Checkbox validation on row select #31356Thanks again,
Could you please recommend an alternative something like … checking checkboxk should immediately focus the control into “Quantity” field where i have validation on user input, what i need to know is switching focus from checkbox to Quantity field.
Possible ?
Thanks
October 25, 2013 at 8:55 pm in reply to: Checkbox validation on row select Checkbox validation on row select #31354Thanks for your reply, i have gone through above example before sending my request.
But which will not be helpful in my case as my validations are based on “CheckBox” state, if “checkbox” selected and “Quantity” field empty then raise an error … i think it’s a valid scenario …
Any work around … on validating “quantity” based on checkbox select ..
Please advice …
Thanks
-
AuthorPosts