jQWidgets Forums
Forum Replies Created
-
Author
-
April 3, 2014 at 4:55 am in reply to: Changing "NumberInput" column properties after grid rendering Changing "NumberInput" column properties after grid rendering #52453
Hi Peter,
Thanks – do you mean something like this?
columns: [{ text: 'Factors', datafield: 'factors', width: 80, columntype: 'custom', createeditor: function (row, cellvalue, editor, cellText, width, height) { editor.jqxNumberInput({ decimalDigits: 4, inputMode: 'simple', max: 0, min: 1, theme: theme, value: 0, spinButtons: true, spinMode: 'advanced' }); }, initeditor: function (row, cellvalue, editor, celltext, pressedkey) { editor.jqxNumberInput({ decimal: parseFloat(cellvalue), max: GlobalMin, min: GlobalMax, }); },
and define vars GlobalMin and GlobalMax globally?
April 1, 2014 at 2:35 am in reply to: "renderstatusbar" and "ready" synchronization "renderstatusbar" and "ready" synchronization #52273Finally, I’ve managed to get it fixed. The problem was not because of “ready/not ready” DOM elements, but because I was rendering the jqxGrid to the same div without destroying the old grid first. In the old version, it worked fine though. So, the remedy was to add
$('#gridID).jqxGrid('destroy');
– before rendering a new grid into the same div. The ‘destroy’ command also deletes the grid div, so it is necessary to recreate the div before rendering a new grid.
March 26, 2014 at 6:03 am in reply to: "renderstatusbar" and "ready" synchronization "renderstatusbar" and "ready" synchronization #51894Hi Peter,
Thanks, I will try to extract a part of the code for debugging. I guess, something has changed in the sync/async options… I keep digging….
March 26, 2014 at 5:44 am in reply to: "renderstatusbar" and "ready" synchronization "renderstatusbar" and "ready" synchronization #51888Hi Peter,
I had to try “on ready”, because my old code was not working with 3.2.2. Now it generates an error:
“jqxGrid: The data is still loading. When the data binding is completed, the Grid raises the ‘bindingcomplete’ event. Call this function in the ‘bindingcomplete’ event handler. “
If I remove the part after “statusbar.append(container);” nor errors are generated
You may test yourself – this code works fine with the old versions, but not with the latest ones (obviously, something has changed):
$("#jqxGrid").jqxGrid({ ....... renderstatusbar: function (statusbar) { var container = $("<div class='btn_cont'></div>"); var sel = $("<div id='h_options' style='font-size: 10px;float:left; margin-left:8px;'><input id='w_base' type='radio' name='hopt' checked='checked' value='1'/><label for='w_base'>Weights</label><input id='h_base' type='radio' name='hopt' value='2'/><label for='h_base'>Positions</label></div> "); container.append(sel); statusbar.empty(); statusbar.append(container); //all manipulations with the created DOM $("#h_options").buttonset(); $("#h_options").jqxTooltip({ content: 'Positions entry', position: 'mouse', theme: theme }); //this part of the code causes "bindingcomplete" error in v 3.2.2 }, ..... ..... });
Any suggestions?
Thanks!
March 26, 2014 at 5:26 am in reply to: "renderstatusbar" and "ready" synchronization "renderstatusbar" and "ready" synchronization #51880Peter, what has changed in the latest release? Why DOM elements created inside “renderstatusbar” are not ready anymore? The above code has been working perfectly fine for “centuries”
What I am saying that it would be nice to maintain the core sync functionality across the latest releases.
March 26, 2014 at 5:22 am in reply to: "renderstatusbar" and "ready" synchronization "renderstatusbar" and "ready" synchronization #51876Further to my previous post. Prior to v.3.2.2 I have been using the following structure with no problems:
$("#jqxGrid").jqxGrid({ ....... renderstatusbar: function (statusbar) { var container = $("<div class='btn_cont'></div>"); var sel = $("<div id='h_options' style='font-size: 10px;float:left; margin-left:8px;'><input id='w_base' type='radio' name='hopt' checked='checked' value='1'/><label for='w_base'>Weights</label><input id='h_base' type='radio' name='hopt' value='2'/><label for='h_base'>Positions</label></div> "); container.append(sel); statusbar.empty(); statusbar.append(container); //all manipulations with the created DOM $("#h_options").buttonset(); $("#h_options").jqxTooltip({ content: 'Positions entry', position: 'mouse', theme: theme }); }, ..... ..... });
It doesn’t work anymore, because the new elements created inside “renderstatusbar” are not ready. I had to revert to the old v.3 until get some stable solution for that….
January 27, 2014 at 9:04 am in reply to: Aggregates and Statusbar together – is it possible? Aggregates and Statusbar together – is it possible? #48420Hi Peter,
Thanks. It would be, perhaps, a nice feature in your coming release – just to have an option to render the statusbar and aggregates into two different divs.
Best,
AndyNovember 28, 2013 at 5:17 am in reply to: Check if a grid contains a column Check if a grid contains a column #45223Thanks, Dimitar! It works fine.
November 20, 2013 at 1:23 am in reply to: Grid float cells sort problem Grid float cells sort problem #32957Got it fixed – data type “float” in the data adapter was missing.
What will happen if we try to render a string in a column of “float” type? Will it revert to a string type for the whole column?
Thanks
November 18, 2013 at 8:46 am in reply to: Editing numeric cells in Grid – cannot enter text Editing numeric cells in Grid – cannot enter text #32842Thanks, Peter.
Actually, the column is not defined as numeric. It is populated from json string, while some values are numeric and some – strings. Everything works fine until I try to enter strings into cells with previous numeric values.
It is not a big deal as I can convert all values to strings before rendering.
November 6, 2013 at 11:31 am in reply to: Dynamic tooltips – how to clean and destroy Dynamic tooltips – how to clean and destroy #32040I have figured it out. If a tooltip element (the one to which a tooltip is attached) is destroyed before attampting to destroy its tooltip, an orphan tooltip div remains on the page.
If I destroy a tooltip first (i.e. $(“div.abc”).jqxTooltip(‘destroy’)) and its element second, everything works fine.
November 6, 2013 at 8:04 am in reply to: Grid export throws an error Grid export throws an error #32026I know that, but it looks as Grid export conflicts with other libraries. I have almost all jQWidgets js libraries loaded. Everything works perfectly fine Grid, dropdowns, sliders etc
But with export functions I am havi ng a problem. If I load 2 export libraries at the end of other jQWidgets libs, it throws an exception “0 is not a function” in the mootools-core.js.
But if I load these just after the jQWidgets core and data libraries, it throws another error:
“Uncaught jqxCore: invalid parameter ”[exportdata, xls, search-res] doesn’t exists”
Nothing to do with mootools.
November 4, 2013 at 7:19 am in reply to: Pinned and resizable columns Pinned and resizable columns #31851Thank you, Peter. Everything works ok.
October 21, 2013 at 11:27 pm in reply to: Adding rows to a grid – duplicates problem Adding rows to a grid – duplicates problem #31136The update:
this code is working…. seems to be related to object referencing for multiple rows.
var rows = []; var res = data.res; $.each(res, function (key, val) { var newf = val; var serObj = { id: newf[0], fund: newf[1] }; rows.push(serObj);; }); $("#curr_wallet").jqxGrid('beginupdate'); $("#curr_wallet").jqxGrid('addrow', null, rows); $("#curr_wallet").jqxGrid('endupdate');
October 21, 2013 at 7:16 am in reply to: What can prevent grid rows from being deleted? What can prevent grid rows from being deleted? #31087Thanks Dimitar! It works!
-
AuthorPosts