jQWidgets Forums
Forum Replies Created
-
Author
-
September 14, 2015 at 7:44 am in reply to: How to set the return data to grid in virtualmode? How to set the return data to grid in virtualmode? #75799
Hello yangtsecxf,
You can check this demo for a working example of jqxGrid used in virtual mode.
In your code you seem to lack the source option for your grid, so it doesn’t know how many total rows it should display. In the provided fiddle you can see it is set to a dataAdapter linked to an empty object array with totalRecords option specified.
Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.comHello Rajesh,
You can take a look at these two demos for examples on how to update the data in your grid.
refresh data demo
and
create/remove/update demo.
If you are still having an issue please provide a fiddle for further assistance.Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.comSeptember 11, 2015 at 2:11 pm in reply to: Using knockout for a sub-menu Using knockout for a sub-menu #75774Hello alanfaux,
Unfortunately we have no such demo.
However what you can do is have a menu initialized by a dataAdapter connected to your json/knockout. Demo for json binding.
And have logic inside one of the dataAdapter’s callback functions (for example loadComplete() callback function) that modifies your data so that has your fixed content along with your dynamic content. You may also need to reset the menu source in loadComplete if the databinding doesn’t update automatically.Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.comSeptember 11, 2015 at 10:03 am in reply to: Date Format : Chart with range selector Date Format : Chart with range selector #75767Hello brogen,
To events area is handled by the following code:
$('#chartContainer').jqxChart(settings) .on('click mouseover mouseout toggle rangeSelectionChanging rangeSelectionChanged refreshBegin refreshEnd', function (event) { if (event.args) dumpEventInfo(event); });
It uses the
dumpEventInfo
function so if you remove the handler you can remove that function as well.
And then you can remove the textarea from the html
<textarea id="eventsTextArea" style="width:800px; height: 200px"></textarea>
Regarding your fist question.
Take a look at theformatFunction
declarations. They are used to specify how the date is formatted, so you can edit them to fit your needs.Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.comSeptember 11, 2015 at 6:17 am in reply to: Get XAxisText with Click Event Get XAxisText with Click Event #75752Hello minsu0806,
The event argument
event.args.elementIndex
holds the information of the records index. So in this case it would return 0, for the first day (e.g. Monday).
So depending on your implementation you can map this value to your desired result. In this particular example you can have something like this:function myEventHandler(event) { var daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; var day = ''; if (event.args.elementIndex !== undefined) { day = daysOfWeek[event.args.elementIndex]; } var eventData = '<div><b>Last Event: </b>' + event.type + '<b>, XaxisText: </b>' + day + '<b>, Serie DataField: </b>' + event.args.serie.dataField + '<b>, Value: </b>' + event.args.elementValue + "</div>"; if (event.type == 'toggle') eventData = '<div><b>Last Event: </b>' + event.type + '<b>, Serie DataField: </b>' + event.args.serie.dataField + '<b>, visible: </b>' + event.args.state + "</div>"; $('#eventText').html(eventData); };
Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.comSeptember 9, 2015 at 7:14 am in reply to: Option label different from the value Option label different from the value #75684Hello nimli,
You can do this in a couple of different ways.
1. If you already have the structure for the html <select> code, you can directly create the jqxDropDownList from that. Here is the demo for it.
2. If you want to only pass array data from php, you can use a dataAdapter, and load it from a JSON array. You can check the binding to json demo for it (note demo is using remote json, but you should be able to change it easily).Best Regards,
VladimirjQWidgets team
http://www.jqwidgets.com/Hello nimli,
Unfortunately there is no direct way to check what type of widget an element is.
If you need to remember what widget is assigned to what element you would need to store this information yourself. I.e. hold it in array for example.However if you only need to set/get the value of the field, you can try using the .val() method which is supported by a big part of the widgets so depending on your case it may work for you.
Best Regards,
VladimirjQWidgets team
http://www.jqwidgets.com/September 9, 2015 at 6:41 am in reply to: jqxGrid default filter operator jqxGrid default filter operator #75682Hello swagdiar,
You can check the demo for filter conditions, for an example of how you can customize your filtering conditions.
You can also find the full list of filter conditions that you can use in the API Reference page for addFilter function.
Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.comHello realtek,
The Tree has no autobind functionality, so if the dataAdapter records get updated after the initialization, you need to reset the source manually.
You can try to use loadComplete callback of the dataAdapter:
loadComplete: function () { $('#jqxTree').jqxTree({ source: dataAdapter.records}); },
Best Regards,
VladimirjQWidgets team
http://www.jqwidgets.com/Hello realtek,
Make sure you have called the dataAdapter.dataBind() method.
Take a look at this sample with the json you provided.Best Regards,
VladimirjQWidgets team
http://www.jqwidgets.com/Hello realtek,
Please try the method used in the binding to json demo.
The mapping there is done in a records variable.var records = dataAdapter.getRecordsHierarchy('id', 'parentid', 'items', [{ name: 'text', map: 'label'}]);
Best Regards,
VladimirjQWidgets team
http://www.jqwidgets.com/Hello realtek,
The TreeGrid source functionality is explained in the demos in the API Reference section under source.
You can find the full list of fields and how they need to be referenced there.
You can use the dataAdapter map: functionality to map your own fields to the relevant value.Example:
{ name: 'label' map: 'DisplayName'},
Best Regards,
VladimirjQWidgets team
http://www.jqwidgets.com/September 7, 2015 at 3:27 pm in reply to: Copy row values in jqxGrid on button click Copy row values in jqxGrid on button click #75605Hello LWCARAB,
For cell content you can use the cellclick event.
This example shows how you can use cellclick event.
All events are listed in the grid API reference where you can find examples on how to use them.
Best Regards,
VladimirjQWidgets team
http://www.jqwidgets.com/Hello LWCARAB.
I think that one of the things you can try is to try binding to the
cellbeginedit
andcellendedit
events of the grid, and manually replace them with\n
during the edit phase but I think that this approach would be very impractical.What I would suggest as a workaround is this:
If you are printing your values in separate rows/cells, you can use the'selectionmode': 'multiplecells'
option to allow your users to select the data they need.In case you need it to be in the same cell, since you are most likely adding the <br/> tags yourself, you can add ‘\n’ symbols instead, and set the following css style:
`.jqx-grid-cell-wrap {
white-space: pre !important;
}`
The !important is needed, since the value is already set originally with !important.Note that since the grid doesn’t really support editing of multiline strings, editing the field will strip the new line symbols, so I would advise that you disable edit if you go this route.
Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.comSeptember 4, 2015 at 11:58 am in reply to: Getting a certain value from Json, inside a jason.. Getting a certain value from Json, inside a jason.. #75502Hello Programmerswe,
I am really sorry, I have missed to share it after I forked it.
You should be able to see it now.Best Regards,
VladimirjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts