jQWidgets Forums
Forum Replies Created
-
Author
-
March 4, 2013 at 11:47 am in reply to: load records in grid after click of next page load records in grid after click of next page #16296
Hi Peter,
I tried with virtualdata but it is bringing required amount of data(10-20 records for example) from the data variable present in ajax call success(as an argument).
But i need to call db for every pagechange event(for 10 records. So i m tring with serverpaging
I am having following questions regarding serverpaging,
1.Can we do serverpaging in dot net?Then how to call controller action from view?
2.Is it supporting jqwidget 2.5 version?
3.Can we do db call for pagechange event again and again?Thanks,
RajaniJanuary 10, 2013 at 11:52 am in reply to: Expanding Nested grid 2nd time database call is not happening Expanding Nested grid 2nd time database call is not happening #13436Hey Peter, U have given one sample in this below url
http://www.jqwidgets.com/community/topic/initrowdetails-is-not-firing-in-single-click/
Would you modify these piece of code with your solution.or
Can you please look into my code.I am using rowexpand to call initrowdetails. still not calling the child grid(nestedgridrecords variable) during 2nd click.
var nestedgridrecords=function (index, parentElement, gridElement, record) {
debugger;$(“#InfoMessages”).html(”);
var parentsLength = $(“#jqxgridExistingPlatform”).parents().length;
var jqxgridnestedgridurl = ‘../PlatformAdmin/GetExistingPltfrmsRegionalData’;var grid = $($(parentElement).children()[0]);
//grid .jqxGrid(‘updatebounddata’);
$.ajax({
url: jqxgridnestedgridurl, cache: false,
data: { PlatformModelID: PlatformModelID },
success: function (data, status, xhr) {
var jqxGridForNestedGrid = {};
jqxGridForNestedGrid = data;
var recordnstd = $(“#jqxgridExistingPlatform”).jqxGrid(‘getrowdata’, index);
var phid = recordnstd.PHNo;
var gridnst = $($.find(‘#grid’ + index));
var datasbyid = $(jqxGridForNestedGrid).find(‘PHNo:’ + phid);
var datasbyidarr = new Array();
for (i = 0; i < datasbyid.length; i++) {
datasbyidarr[i] = $(datasbyid[i]).parent()[i];
}jqxGridForNestedGrid = DateSet(data);
var ssource = {
datafields: [{ name: 'PlatformDateID' }, {}],
datatype: "array",
localdata: jqxGridForNestedGrid
}
ssource = new $.jqx.dataAdapter (ssource);if (grid != null) {
grid.jqxGrid({
source: ssource,
theme: theme, width: '96%', autoheight: true, editable: false, altrows: true, enabletooltips: true,
columns: []
});
}}
});
}
$('#jqxgridExistingPlatform').bind('rowexpand', function (event) {
debugger;/* Upto here it is coming but nestedgridrecords(debugger) not going when clicking for 2nd time. */
$('#jqxgridExistingPlatform').jqxGrid({ initrowdetails: nestedgridrecords });
//$("#jqxgridExistingPlatform").jqxGrid('updatebounddata');
});$("#jqxgridExistingPlatform").jqxGrid(
{
width: '100%',
//autowidth: true,
height: 310,
//autoheight: true,
source: dataAdapterExistingPlatform,
editable: true,
pageable: true,
altrows: true,
enabletooltips: true,
theme: theme,
enablehover: false,
selectionmode: 'multiplerows',
filterable: true,
sortable: true,
editmode: 'multiplecellsextended',
rowdetails: true,
rowdetailstemplate: { rowdetails: "“, rowdetailsheight: 130, rowdetailshidden: true, width: “100%” },
//initrowdetails: nestedgridrecords,
autoshowfiltericon: true,
columns: [January 10, 2013 at 7:26 am in reply to: Expanding Nested grid 2nd time database call is not happening Expanding Nested grid 2nd time database call is not happening #13413How will it hit the debugger 2nd time. In grid,I am calling like this
initrowdetails: nestedgridrecords,
Need your help peter.
January 10, 2013 at 7:26 am in reply to: Expanding Nested grid 2nd time database call is not happening Expanding Nested grid 2nd time database call is not happening #13412How will it hit the debugger 2nd time. In grid calling like this
initrowdetails: nestedgridrecords,
Need your help peter.
January 10, 2013 at 7:22 am in reply to: Expanding Nested grid 2nd time database call is not happening Expanding Nested grid 2nd time database call is not happening #13411Once i m expanding the nested grid button its hiting debugger; but when doing 2nd time(after collapse),its not hitting debugger.
Need help…var nestedgridrecords=function (index, parentElement, gridElement, record) {
debugger;
var parentsLength = $(“#jqxgridExistingPlatform”).parents().length;
var jqxgridnestedgridurl = ‘../PlatformAdmin/GetExistingPltfrmsRegionalData’;
var grid = $($(parentElement).children()[0]);
grid.bind(‘bindingcomplete’, function (event) {
if (event.target.id == “grid” + index) {
grid.jqxGrid(‘beginupdate’);
var datainformation = grid.jqxGrid(‘getdatainformation’);
for (var i = 0; i < datainformation.rowscount; i++) {
var hidden = true;
grid.jqxGrid('setrowdetails', i, "“, 220, hidden);
}
grid.jqxGrid(‘endupdate’);
}
});
//grid.jqxGrid(‘updatebounddata’);//not happening
grid.jqxGrid(‘updatebounddata’);$.ajax({
url: jqxgridnestedgridurl, cache: false,
data: { PlatformModelID: PlatformModelID },
success: function (data, status, xhr) {
var jqxGridForNestedGrid = {};
jqxGridForNestedGrid = data;
var recordnstd = $(“#jqxgridExistingPlatform”).jqxGrid(‘getrowdata’, index);var gridnst = $($.find(‘#grid’ + index));
var datasbyid = $(jqxGridForNestedGrid).find(‘PHNo:’ + phid);
var datasbyidarr = new Array();
for (i = 0; i < datasbyid.length; i++) {
datasbyidarr[i] = $(datasbyid[i]).parent()[i];
}var ssource = {
datafields: [{ name: 'PlatformDateID' },….],
datatype: "array",
localdata: jqxGridForNestedGrid
}ssource = new $.jqx.dataAdapter(ssource);
if (grid != null) {
grid.jqxGrid({
source: ssource, theme: theme, width: '96%', autoheight: true, editable: false, altrows: true, enabletooltips: true,
columns: [{ text: '', datafield: 'PlatformDateID', width: '0%', hidden: true },
………..
]
});
}}
});
}
nestedgridrecords.jqxGrid('updatebounddata');//not happening(ERROR)
$(“#jqxgridExistingPlatform”).jqxGrid(
{
width: ‘100%’,
//autowidth: true,
height: 310,
//autoheight: true,
source: dataAdapterExistingPlatform,
editable: true,
pageable: true,
altrows: true,
enabletooltips: true,
theme: theme,
enablehover: false,
selectionmode: ‘multiplerows’,
filterable: true,
sortable: true,
editmode: ‘multiplecellsextended’,
rowdetails: true,
rowdetailstemplate: { rowdetails: ““, rowdetailsheight: 130, rowdetailshidden: true, width: “100%” },
initrowdetails: nestedgridrecords,
autoshowfiltericon: true,January 9, 2013 at 1:50 pm in reply to: Expanding Nested grid 2nd time database call is not happening Expanding Nested grid 2nd time database call is not happening #13380If you have any sample code please share.
July 24, 2012 at 10:02 am in reply to: Copy the selected rows below of it Copy the selected rows below of it #6286I have done that.
We need to change
if(d==”last”){this.records.push(h)}else{this.records.splice(d,0,h)}
in jqxgrid.js file
previously it was
if(d==”last”){this.records.push(h)}else{this.records.splice(0,0,h)}Thanks.
July 24, 2012 at 5:28 am in reply to: Copy the selected rows below of it Copy the selected rows below of it #6279I want to add just below the selected rows.If i am doing below code the then datas are adding in first two rows(if i am selecting 2 rows for copy) .How can i add just below of the selected row?
$(“#CopyRow”).jqxButton({ width: ‘110’, height: ’25’ });
$(“#CopyRow”).bind(‘click’, function () {
debugger;var selectedrowindexs = $(“#jqxgrid”).jqxGrid(‘selectedrowindexes’);
var selectedrowindex = $(“#jqxgrid”).jqxGrid(‘getselectedrowindex’);
var id = $(“#jqxgrid”).jqxGrid(‘getrowid’, selectedrowindex);
var nextrow = id + 1;var row = [];
for (var i = 0; i < selectedrowindexs.length; i++) {
row[i] = $("#jqxgrid").jqxGrid('getrowdata', selectedrowindexs[i]);//$("#jqxgrid").jqxGrid('addrow', null, row, nextrow);
}
//$("#jqxgrid").jqxGrid('addrow', null, row);
for (var j = 0; j < row.length; j++) {
$("#jqxgrid").jqxGrid('addrow', selectedrowindexs, row[j], nextrow+j);
}
});July 24, 2012 at 4:33 am in reply to: Copy the selected rows below of it Copy the selected rows below of it #6277Sorry. image is
July 16, 2012 at 10:35 am in reply to: Multiple checkbox in a cell is not happening Multiple checkbox in a cell is not happening #5992Hi Peter, In your example one dropdownlist we can put inside a cell .But i want to put multiple dropdown inside a cell because i want to track more than one values from a cell.
I am trying to put multiple checkboxes inside a cell.Its happening beacause i am passing html tags from controller.But i can’t able to track the selected checkbox values.Can you please help.
//Controller
[HttpGet]
public JsonResult GDPerhipheralsAdmin()
{List list = new List() {
new PerhipheralsAdminJqgrid() { Select=true,mcb=” Dvd Writter Dvd Rom CD Writter CD Rom “, PartNumber =”PO10000”, PartDescription = “PO10000Description”,ImagewatchDescription=”PO10000ImageDescription”,AvailbleInImagewatch =true},};
return Json(list, JsonRequestBehavior.AllowGet);
}
//View
$(“#jqxgrid”).jqxGrid(
{
width: 950,
height: 30,
editable: true,
source: dataAdapter,
theme: theme,
selectionmode: ‘singlecell’,
autoheight: true,
selectionmode: ‘multiplerows’,
columnsresize: true,
background: ‘red’,
color: ‘white’,
//checkboxes: true,
ready: function (row, e) {
//debugger;
rowcount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
//var rows = $(“#jqxgrid”).jqxGrid(‘selectedrowindexes’);
//var rowh = rows.length;
for (var i = 0; i < rowcount; i++) {
$('#jqxgrid').jqxGrid('setrowheight', i, 90);
}},
columns: [
{ text: 'Select All', editable: false, columntype: 'checkbox', width: 70 },
{ text: 'Available In ImageWatch', editable: true, dataField: 'mcb',
initeditor: function (row, cellvalue, editor) {
//return " Dvd Writter Dvd Rom CD Writter CD Rom”;
},
cellsrenderer: function (cellvalue, cell, rowid, iCol, cellcontent, e, row, columnfield, value, defaulthtml, columnproperties) {
debugger;
//I did in 3 ways to track the value but not happening????????
var checkd = null; //$(rowid). //cellcontent.datafield.mcb
if (iCol.Checkbox1.Checked == true) {
checkd += Checkbox1.value + “,”;
}
else if (rowid .Checkbox2.Checked) {
checkd += Checkbox2.value + “,”;
}
else if (Checkbox2.Checked) {
checkd += Checkbox2.value;
}return checkd;
}, width: 200
},
{ text: ‘Dell Part Number’, editable: false, columntype: ‘textbox’, dataField: ”, width: 100 },
{ text: ‘Agile Part Type’, editable: false, dataField: ‘AvailbleInImagewatch’, width: 100 },
{ text: ‘Software Type’, editable: false, dataField: ”, width: 120 },
{ text: ‘Agile Description’, editable: false, dataField: ”, width: 160 },
{ text: ‘Brand Name’, dataField: ”, width: 120 },
{ text: ‘Hidden Internal’, dataField: ”, width: 70 },
{ text: ‘Hidden External’, dataField: ”, width: 70 }]
});July 12, 2012 at 11:24 am in reply to: Multiple checkbox in a cell is not happening Multiple checkbox in a cell is not happening #5876Is it possible to put listbox having multiple items instead of checkboxes????
July 12, 2012 at 11:05 am in reply to: Multiple checkbox in a cell is not happening Multiple checkbox in a cell is not happening #5873If any changes need to be done inside plugins.Please let me know.
July 6, 2012 at 11:33 am in reply to: serializeJSONArray is not working serializeJSONArray is not working #5725I can able to take single row data from view to contoller but i want to take every row data.How will i take.?
Datas are comining like [0]{name and namevalue,age and agevalue,…..},[1]{name and namevalue,age and agevalue,…..},…..
but i need like[0]{name and namevalue},[1]{age and agevalue},…..,[4]{name and namevalue},[5]{age and agevalue},…..name, age properties have been defined in viewmodel.Thats why when its hiting to controller’s method only 2 value is showing what ever has been defined in view model.But in grid those properties are repeated every time.Means for every rows.
Can you plz help me? -
AuthorPosts