Code:
var index1 = 2;
var index2 = 3;
var dg = $('#dg');
var rows = dg.datagrid('getRows');
var temp = rows[index1];
rows[index1] = rows[index2];
rows[index2] = temp;
dg.datagrid('refreshRow',index1);
dg.datagrid('refreshRow',index2);
Home | Help | Search | Login | Register |
71
on: October 14, 2023, 06:14:00 PM
|
||
Started by Wojak - Last post by jarry | ||
This code shows how to swap two rows in a datagrid.
Code: var index1 = 2; |
72
on: October 05, 2023, 03:28:17 PM
|
||
Started by Wojak - Last post by Wojak | ||
Hi,
I would like to add a button that allows the rows to be swapped up and down. I found a post from 2014, but it doesn't work https://www.jeasyui.com/forum/index.php?topic=3634.0 Snippet of the code Code: function dgSwapColumns(from, to) { It gives me this error Code: Uncaught TypeError: $.fn.datagrid.methods[_8ee] is not a function |
73
on: September 27, 2023, 09:22:06 AM
|
||
Started by lloyd - Last post by lloyd | ||
Hi,
I have created a combobox search that lookup postcodes (zipcodes). But I do not want the the combobox text changed when the user selects an address. How do I prevent combobox onSelect from changing (setting) the combobox textbox? Code: <!DOCTYPE html> |
74
on: September 20, 2023, 06:16:45 AM
|
||
Started by rezzonico - Last post by rezzonico | ||
Thanks !
Regards Miche |
75
on: September 10, 2023, 08:02:39 PM
|
||
Started by rezzonico - Last post by jarry | ||
Please refer to this example.
Code: <!DOCTYPE html> |
76
on: September 07, 2023, 08:11:08 AM
|
||
Started by fmdano - Last post by larryclyons | ||
Just bumping it up for notice. Thx jarry
|
77
on: September 01, 2023, 09:29:54 AM
|
||
Started by jega - Last post by jega | ||
Ohh, just found it in another topic
$('#ff').form('submit', { onSubmit: function(){ var form = $(this); var isValid = form.form('validate'); if (!isValid){ var field = form.find('.validatebox-invalid:first'); var panels = $('#tabs').tabs('tabs'); for(var i=0; i<panels.length; i++){ var panel = panels; if (panel.has(field).length){ var index = $('#tabs').tabs('select', i); setTimeout(function(){ field.focus(); },0) break; } } } return isValid; } }) |
78
on: September 01, 2023, 09:24:30 AM
|
||
Started by jega - Last post by jega | ||
Hi.
On validation, how can i show the tab where the required textbox is ?? Jesper |
79
on: August 30, 2023, 12:06:15 PM
|
||
Started by fmdano - Last post by fmdano | ||
Hey all,
SO I have a tree grid. There are multiple rows deep. I need to click a link outside the grid where I pass in a value from the 3rd level down and need to get the grid to refresh and then expand level 1, and level 2 and then expand level 3 and select the row I passed in the id. I know I can use this code: $(this).treegrid('expand', gridID).treegrid('select', gridIDSel); if gridID is 1_1 then it will expand the first level and first row. Then inside level 2 gridIDSel: 2_6 then it will select that row. If I want to highlight 3_22 then how can I expand 1_1 and 2_4 and then 3_20 (id's are examples)? Do I need to use 3 different expand code lines where I know what the parent id is for the level 3 and then get the grand parent which is level 2 and great-grandparent for level 1, OR is there something where if i pass in a Level 3 id (3_22) to the expand code line, the all the above levels will expand? Any thoughts on this? thanks... |
80
on: August 30, 2023, 03:42:41 AM
|
||
Started by rezzonico - Last post by rezzonico | ||
Hi,
I have a combobox where the user can select different line types. In the drop-down list the lines are displayed correctly, but once a line is selected, in the combobox appears the HTML code. Is it possible to display the line and not the code ? See the code here: http://217.193.156.220/jeasyui/BBB/ Thanks Miche |