jQWidgets Forums
Forum Replies Created
-
Author
-
Hi again …. I haven’t resolve this case and I was thinking that you maybe can help me …. I was thinking the perfect scene for example if a value if more than 30 in a column call quantity so the button is avariable in other case I would like that his state is disable .. It is posible ?
best regards
July 8, 2013 at 9:11 pm in reply to: How to get a Column that is not visible How to get a Column that is not visible #24744Other example it’s a registerID this field doesn’t show but it’s exist in datafield array but not in columntext … so if I would like set a cellvalue of any cell that doesn’t show. In version 2.4 it was working fine.
Which it is best way to bind the grid?
In your example got this .
var data = generatedata(100); var source = { localdata: data, datatype: "array", updaterow: function (rowid, rowdata) { // synchronize with the server - send update command } }; var dataAdapter = new $.jqx.dataAdapter(source);
In my example i got this =>
var respuesta = $.parseJSON(result.d); var source = { datatype: "json", datafields: [ { name: 'ready', type: 'boolean' }, { name: 'isclient', type: 'boolean' }, { name: 'indice', type: 'int' } ], id: methods.getID()//return my ID }; $.map(respuesta.result, function (n, i) { n.ready = 0; // I set the values of columns that not in my array so I add. n.isclient = 0; n.indice = i + 1; }); source.localdata = respuesta.result; var cantidad = respuesta._datas.length;// I add the other datafields.... this come the server and i don't know the names. for (var i = 0; i < cantidad; i++) { source.datafields.push({ name: respuesta._datas[i].datafields }); } var dataAdapter = new $.jqx.dataAdapter(source); $('#name').jqxGrid({ source: dataAdapter });
WHen i Try to export the first column type boolean it gives me error
var u = function (E, B, C, A, G, F, D) {
this is because “this.element” is undefined. In your example comes pretty well.
var t = a(this.element);
u(r, t, true, false, this, s, v);
I got a question I added a Column type checkbox but this column doesn’t exist in my dataarray , so when grid has bindinComplete I search this column and i set the value to false. When I try to export when try to searh the column type doesn’t find so it return string.
To export Do i have to add this column to my object datasource ?
I added to your example checkbox column and works fine ! but in my doesn’t work.
Hi , I was trying to find the error when i trying to export.
In your example “Export data” you don’t have a checkbox column and works fine but if you add a checkbox column it gives me error.
Never mind I think the error it’s mine . My bad. Thanks
Thanks for reply , when i said “Do i have to configure something ” I mean if I have to change any property because i was reading the documentation and I see this “The last parameter is optional and determines the url of the export server. By default, the exporter is hosted on the jQWidgets website.”
My projects it’s on ASP.net and it’s kind difficult send u.!!!
October 10, 2012 at 4:18 pm in reply to: Aggregates with empty Grid. Aggregates with empty Grid. #9210Can i change the columntype to numeric in cellendedit and initeditor change to textbox?
October 10, 2012 at 2:57 pm in reply to: Aggregates with empty Grid. Aggregates with empty Grid. #9201Thanks for reply … the problem it’s that i added some key like ‘+,-,*,/’ so the final user can do operations with strings like “2+2” and validation function it’s solve the string and put 4 .
if i change the typetextbox to numeric i have to add some code to let writes the keycode.
September 24, 2012 at 3:54 pm in reply to: Add javascript code after created Add javascript code after created #8385HI , thanks for reply.
i’m doing this way.
for (var i = 0; i < config.columsDecimal.length; i++) { var datafield = config.columsDecimal[i]; var column = $('#' + config.name).jqxGrid('getcolumn', datafield); column.validation = numbervalidation; column.initeditor = numberiniteditor; column.aggregates = aggregates; column.aggregatesrenderer = aggregatesrenderer; }
where config.columsDecimal=[‘column1′,’column2’] ;
this way i’m doing dynamic columns. I got a class config.So i add the function this way but i got a problem with aggregates and rernder.It’s seem the aggregates it’s a array so in the aggregatesrenderer get the value in the array.
These are the functions
var aggregatesrenderer = function (aggregates) { var renderstring = aggregates['total_']; return '<span style="margin-top: 4px; float: right;"><strong> Total : ' + renderstring + '</strong></span>'; }; var aggregates = function (Value, currentValue, column, record) { //[{ 'total_': function (Value, currentValue, column, record) { if (typeof (currentValue) != 'undefined') return parseFloat(currentValue) + parseFloat(Value) else if (typeof (Value) != 'undefined') return parseFloat(Value) else return 0 // } // }] };
how can i do the aggregate and aggregaterenderer like other functions…
September 17, 2012 at 3:21 pm in reply to: something wrong with the vertical line in grid. something wrong with the vertical line in grid. #8059Hi thanks for reply … well i got this problem in Chrome .. i got the version 20.+++.
I got six columns with the property columnsresize: true and each one got a width 10 , so when the datagrid it’s ready i do this.
this.setRenderGrid = function () {
$ = jQuery.noConflict();
var a = $("#container").width();
for (var b = 0; b <= this.numColumns - 1; b++) {
var c = $(this.grid).jqxGrid("columns").records[b].datafield;
var d = this.rendersizes[b];
var e = d * a / 100;
$(this.grid).jqxGrid("setcolumnproperty", c, "width", e);
}
$(this.grid).jqxGrid({
width: a - 2
})
};
Container it’s a div with width 98% so i resize the div. In the version 2.4.0 this works fine ! i would like to share a image but i don’t know how to attach a image.
That’s the other part of my code…
$(migrid.grid).jqxGrid({
width: "100%",
source: dataAdapter,
editable: true,
altrows: true,
enablehover: true,
enabletooltips: true,
columnsresize: true,
enableanimations: true,
keyboardnavigation: true,
autoheight: true,
pageable: false,
columnsresize: true,
theme: "classic",
editmode: "selectedcell",
selectionmode: "singlecell",
ready: function () {
migrid.setRenderGrid()
},
columns: [{
text: "",
columntype: "checkbox",
width: 10,
datafield: "ready",
cellbeginedit: isCellEditable
},
........ others columns
});thanks for replay.
I wanna add that my grid is bind by $.ajax in success .
But it’s works pretty well.
i sent you!
i was searching and the error occurs when i click and the function “_getexportcolor: function (k) {” where k is undefined ? any idea? i update the version 2.4.1 to 2.4.2 so ?
-
AuthorPosts