ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: RedBully on April 11, 2014, 01:46:43 pm
-
Hopefully this one will post successfully. I'll add as an attachment as well in case not.
I am aware the param query grid is quite column centric in its design and implementation. We are trying to step out of this a little and are passing down grid metadata in JSON which we then want to consume in callback functions. This worked OK for editable and render but we
-
I see you are trying to use different editors for different cells in the same column.
ParamQuery offers column, row and cell level granularity so yes it's doable.
editor.type callback fn is supposed to provide rowIndx (it's added in next version) but that's not a big issue since you can get rowIndx from ui.rowData using method getRowIndx.
I guess there is no need to keep a separate cellMetaData array to store meta data (dataType) for the cells. rowIndx would change when you sort / filter the rows and that would cause misalignment between meta data and grid data.
It's better to store cell meta data in rowData which is quite simple and easy similar to the way pq_cellcls does for storing cell classes.
rowData[ namespace + '_dataType' ] [ dataIndx ] = constants.PropertyDataType.Date;
-
Very good. I'm struggling with the syntax for getRowIndx if you would provide an example please.
Instead of var r = ui.rowIndx;
?
Ta.
-
var rowIndx = $grid.pqGrid ( "getRowIndx", { rowData: ui.rowData } ).rowIndx;
http://paramquery.com/pro/api#method-getRowIndx
-
Ta but
var r = $(gridId).pqGrid("getRowIndx", { rowData: ui.rowData }).rowIndx;
returning undefined for me.
-
Assuming your gridId is correct, it should be $("#"+gridId)
still it's better to use $(this)
var rowIndx = $( this ).pqGrid ( "getRowIndx", { rowData: ui.rowData } ).rowIndx;
-
Thanks. A minor variant worked - I had to pass this into the function.