jQWidgets Forums
jQuery UI Widgets › Forums › Grid › columntype: number
This topic contains 5 replies, has 2 voices, and was last updated by Hristo 4 years, 10 months ago.
-
Authorcolumntype: number Posts
-
Hello.
Is there any meaningful application area for the “columntype: number”? I tried everything to show numbers in the table – but to no avail. Instead of the actual values, only the rows are numbered from top to bottom. That makes no sense. I use the data adapter with data of the type array. The display of the values with columntype textbox works.Thanks.
Hello DeployDuck,
Could you clarify it?
Please, provide us with an example that demonstrates this.
I tested this demo and it seems to work fine:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/defaultfunctionality.htm?lightBest Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHello Hristo,
i’ve just build a grid with about 2500 columns. I have a lot of columns from datatype integer, float and decimal. The data is available throug an array of objects. I have checked, that the data in the array is of the correct datatype.
If I try to use columntype: number I don’t get the data displayed in the column. Instead I got all rows of this column numbered 1,2,3,4,5,…But everything works fine for me with columntype: textbox. Thats the reason for my question.
thanks.Hello DeployDuck,
Could you clarify what do you want to achieve?
Meanwhile, I would like to suggest you look at this example.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHello Hristo,
perhaps it’s only an error in your documentation:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-api.htm
Under column you find the description of columntype:columntype – sets the column’s type.
Possible values:
‘number‘ – readonly column with numbers.If have modified your example to use columntype: number instead of
numberinput, that you choose for the first column. Try it and you will get 1,2,3,4,5,6 instead of the real data.var data = [ { firstnumber: 1008768761, secondnumber: 10.01 }, { firstnumber: 678687, secondnumber: 10.01 }, { firstnumber: 10067671, secondnumber: 10.01 }, { firstnumber: 1067868701, secondnumber: 10.01 }, { firstnumber: 1678687001, secondnumber: 10.01 }, { firstnumber: 10686876801, secondnumber: 10.01 }, { firstnumber: 287687686002, secondnumber: 20.02 } ]; var source = { localdata: data, datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source, { loadComplete: function (data) {}, loadError: function (xhr, status, error) {} }); $("#jqxgrid").jqxGrid({ theme: "energyblue", altrows: true, width: 500, autoheight: true, source: dataAdapter, columns: [{ text: "First Number", datafield: "firstnumber", columntype: "number", width: 100 }, { text: "Second Number", datafield: "secondnumber", columntype: "numberinput", // width: 100 }] });
Best Regards
Hello DeployDuck,
Thank you for this information.
I will include a work item for this.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.